accessing riaksearch indexes

Sean Cribbs sean at basho.com
Fri Apr 1 09:24:43 EDT 2011


Yes, use a search query to initiate your MapReduce job, however, the results will not be limited to a fixed number (all matches will be returned). If that will work for you, initiate your job like so:

{"inputs":{"mod":"riak_search", "fun":"mapred_search", "arg":["bucketname", "updated:2011-03*"]},
 "query":[ ... ]}

It might be worthwhile to try the query from the search shell or the solr endpoint first, just to be sure you're getting the results you want.

Sean Cribbs <sean at basho.com>
Developer Advocate
Basho Technologies, Inc.
http://basho.com/

On Apr 1, 2011, at 9:01 AM, Thomas Bikeev wrote:

> Hello,
> 
> a noob question really but here we go:
> 
> A have a number of records that have been indexed via riaksearch. Each of the records has an 'updated' field (example: ... 'updated': '2011-03-31T22:26:31' ... ) based on which I would like to sort all the records getting out limited number of those that are most of date (just the tip or the left-hand-side of the long list). Can I do it without traversing the whole bucket in the map phase?
> 
> Many thanks, Thomas
> 
> -- 
> Thomas Bikeev
> Sent with Sparrow
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110401/f82a0db0/attachment.html>


More information about the riak-users mailing list