Riak Search Solr API rows and sort interaction
fearsome.lucidity at gmail.com
Tue Oct 25 15:57:28 EDT 2011
Thanks to the issue you pointed me to, I found out that Riak search
implements a presort option that is not documented that allows me to sort by
key. As the my key is timestamp based, it allows me to sort by time. Alas,
it does not allow you to select the direction for sorting (only ascending
for key). But by issuing an initial query to the Solr API requesting zero
rows, I can find out the number of results, then issue a new query using
presort=key, start and rows to obtain either to earliest or more recent
results matching my query. That is sufficient to implement paging.
You may want to document the presort Solr query option in the Wiki.
On Tue, Oct 25, 2011 at 9:35 AM, Elias Levy <fearsome.lucidity at gmail.com>wrote:
> Thanks for the reply. Glad to hear its documented. BTW, I am attempting
> to sort on an inline field, so that partial solution would at least be
> useful to me. But for the time being we'll go with a MR job.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users