2i Values

Tim Ariyeh tariyeh at softlayer.com
Fri Nov 18 11:48:48 EST 2011


I was referring to the index value.  I understand I need to make another trip to get the actual value stored at the key, but I was hoping I could get the value of the index field directly from an index query.

For clarity, if I have a riak key "foo" with a value of "bar", and an index "score_int" with a value of 5, I'd like to be able to range query against the score_int index and return both the list of keys ("foo") and the value of the index I queried ("5").

From: Rusty Klophaus [mailto:rusty at basho.com]
Sent: Friday, November 18, 2011 10:43 AM
To: Tim Ariyeh
Cc: riak-users at lists.basho.com
Subject: Re: 2i Values

Hi Tim,

No, that's not currently possible.

Just to clarify, when you say you want the "respective value", do you mean the object's value in Riak (ie: the result of a GET operation) or rather the index's value (ie: the value associated with the _int index)?

On Fri, Nov 18, 2011 at 11:04 AM, Tim Ariyeh <tariyeh at softlayer.com<mailto:tariyeh at softlayer.com>> wrote:
Is it possible to return a value along with a 2i query?  For instance, if I perform a range query against an _int index, can I return both the relevant and keys  their respective value for that field?

If not, can they be accessed in a reduce function without loading the document?


riak-users mailing list
riak-users at lists.basho.com<mailto:riak-users at lists.basho.com>

Rusty Klophaus (@rustyio)
Basho Technologies, Inc.

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

More information about the riak-users mailing list