How to retrieve just certain amount of docs from a larger query?

Hi,

i need to fire a query against larger amount of docs (100.000)
I just need to get back _id under a certain soerting and therefore using
_source filter false, so there is no overhead by gettings _source data.
Nevertheless the response and response processing of course takes a while
caused by the large amount.

Question: Is there a way to to do something like "execute the query, but
just give me the 10 docs before and 10 docs after a certain doc identified
by id" ?

Thx in advance,
Tom

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/086989ae-5568-4d3c-9c09-a449f4d7a7ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Look into the scan/scroll query

It works like a cursor that iterates through all docs of a query result

Jörg

On Wed, May 28, 2014 at 1:42 PM, Tom t.oppelt@superreal.de wrote:

Hi,

i need to fire a query against larger amount of docs (100.000)
I just need to get back _id under a certain soerting and therefore using
_source filter false, so there is no overhead by gettings _source data.
Nevertheless the response and response processing of course takes a while
caused by the large amount.

Question: Is there a way to to do something like "execute the query, but
just give me the 10 docs before and 10 docs after a certain doc identified
by id" ?

Thx in advance,
Tom

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/086989ae-5568-4d3c-9c09-a449f4d7a7ce%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/086989ae-5568-4d3c-9c09-a449f4d7a7ce%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHW3sr2rrH79XZZH%3D7LQdYMZMo%2BJ93bL53wtEhPajJ81g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.