Riak Search Solr API rows and sort interaction

Elias Levy 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:

> Rusty,
>
> 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...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20111025/8676a82c/attachment.html>


More information about the riak-users mailing list