Hi Josh, In order to run efficiently, scan queries read records sequentially on disk and keep a cursor that is used to maintain state between successive pages. It would not be possible to get records in a random order as it would not be possible to read sequentially anymore.
On Wed, Feb 19, 2014 at 9:04 PM, Josh Harrison <[email protected]> wrote: > I need to be able to pull 100s of thousands to millions of random > documents from my indexes. Normally, to pull data this large I'd do a scan > query, but they don't support sorting, so the suggestions I've seen online > for randomizing your results don't work (such as those discussed here: > http://stackoverflow.com/questions/9796470/random-order-pagination-elasticsearch > ). > Is there a way to introduce randomness into a basic scan query? > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/b3971dda-2963-48ce-b7ed-f50e85b82a97%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- Adrien Grand -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7q5kL-9T3g15d-2fqRJ1X8B6i-dMh3CO%3D8rLYidov2Eg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
