Retrieve Score - MapReduce over Search

Ryan Zezeski rzezeski at
Mon Aug 8 22:17:22 EDT 2011


The score is indeed in the KeyData parameter when running a mapred job with
a Search query as input.  In Erlang the KeyData variable would hold a value
something like `{struct, [{score, [1.0]}, {p, [4,16]}, ...]}`.  Taking a
look at the Java client it seems the functionality doesn't currently exist
but a PR is in the works [1].  If I feel ambitious after dinner perhaps I'll
see if I can get it working.



On Wed, Aug 3, 2011 at 1:55 PM, Barron Logan <blogan at> wrote:

> hello,
> we are using riak search in our project via the riak-java client.
> using mapreduce over search; we are getting back bucket-key pairs but need
> to get the search-related scores for each returned object as well.
> we believe that the score may be in KeyData parameter but are unsure of how
> to retrieve it?
> can someone give an example of how to write a custom map function (js?) to
> retrieve the score, or give some additional guidance please?
> advTHANKSance,
> -barron
> _______________________________________________
> riak-users mailing list
> riak-users at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list