On 01/03/2017 02:12 AM, sebb wrote:
> The test VM is now running ES 5.x with a basic database.
> The Apache config appears OK, Javascript is able to invoke lua scripts OK.
> 
> However a couple of the queries fail:
> 
> api/pminfo.lua:169: Backend Database returned code 400!
> 
> {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"No
> search type for
> [scan]"}],"type":"illegal_argument_exception","reason":"No search type
> for [scan]"},"status":400}

search_type changed in 5.x to mean something else, and should be omitted
in scan function in elastic.lua, AIUI.

> 
> api/stats.lua:410: Backend Database returned code 400!
> 
> {"error":{"root_cause":[{"type":"parsing_exception","reason":"no
> [query] registered for
> [limit]","line":1,"col":405}],"type":"parsing_exception","reason":"no
> [query] registered for [limit]","line":1,"col":405},"status":400}

limit is a thing of the past, and the size parameter has changed as well
(it not denotes the total docs in the next scroll, not per shard/node).
It might be easier to adjust this for ES 2.3/5.1 and not support earlier
versions of ElasticSearch going forward.

I seem to also recall some harmonization needed between hard configured
limits to results and how the scroll API works. I'll look into that ASAP.

> 
> I have tried the stats.lua query directly in curl and it fails with
> the same error, so this is not a Lua issue.
> 
> It looks like the syntax for these particular queries has changed in 5.x.
> 
> However I was told that lists.a.o was running on 5.x.
> If so, then I assume it must have had some fixes to the syntax which
> have not been back-ported to the mainline code?
> 
> Anyone got any idea what needs fixing?
> 

Reply via email to