basho/riak_wiki — Issue #232: Riak search and continuation cookies best practice question
Author: jcmorgan2
Created: 2011-12-19 13:19:06+00:00
State: open

Is there any example code for using Riak in the following scenario:

- large data set to search
- client wants a sub-set of the full data set. The data set is of course held in Riak. The server will start the search on riak and will retrieve a set of results to be sent back to the client, however, this is not the entire set of results (since that could be millions)
- the client can then ask for the next sub-set of results, continuing from the previous set of results. Client can send a cookie to say "this is the last position of my search"

The question is: is there a way to continue to searching in Riak, or do I need to keep a session open (with a loop ready to send back the next set of results)? Ideally I wouldn't have to keep the session open since it involves lots of session management. Much better to be able to say search from key x. Example code from Java would be great!?!

Alternatively: is there any limitation to the number of open searches?

Any help would be much appreciated