Does scroll with query string work?


#1

We are using Elasticsearch 2.1.0 and tried using the query string with the scroll getting all the results from an index (small sized just 26k docs) but that doesn't seem to be working from the query string;

The first query is like this;
http://localhost:9200/index/type/_search?scroll=1m&size=100 -- this does return 100 records with a _scroll_id in the response.

And the next query we fire is this;
http://localhost:9200/_search?scroll=1m&size=100 &scroll_id=<scroll_id_from_prev_qry_result> -- this query instead of returning docs from the same index returns docs from all the indexes in our cluster

The documentation here elasticsearch-2.1-reference does say "For backwards compatibility, scroll_id and scroll can be passed in the query string" but it doesn't seem to work as expected.

However the same requests using curl -XGET seems to be work fine.

Has anybody tried this out ? Is there any known issue using scroll with query string or am missing something out here ?

Also if scroll works with the query string then is the sort = _doc also supported with the query string ?


(Christoph) #2

You seem to be missing the scroll endpoint after _search, so it performs a regular march_all on the whole cluster. I just tried this and it works:

http://localhost:9200/_search/scroll?scroll=1m&size=100&scroll_id=...

#4

ohhw okie .. what a bummer - all that to just figure out missing an endpoint.

That worked. Thanks for your response.


(system) #5