Retrieve Score - MapReduce over Search

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


Barron,

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.

-Ryan

[1]: https://github.com/basho/riak-java-client/pull/32

On Wed, Aug 3, 2011 at 1:55 PM, Barron Logan <blogan at sharecare.com> 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 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/20110808/f4338c9b/attachment.html>


More information about the riak-users mailing list