Retrieve all keys of an index?

Jeff Peck jeffp at
Tue Apr 9 21:54:02 EDT 2013


In Riak, is it possible to retrieve all of the keys of an index? I do not want the object keys in this case, but rather the actual index keys.

I am not sure that I am using the correct terminology, but to illustrate, consider a Riak bucket with the following objects, where "catalog" is indexed to "catalog_bin":

{'url':'', 'catalog':'1001'}
{'url':'', 'catalog':'1001'}
{'url':'', 'catalog': 1002'}
{'url':'', 'catalog': 1002'}
{'url':'', 'catalog': 1003'}

I would like to retrieve all of the keys for the index catalog_bin. From the above example, that would be:

To illustrate further, it would be the equivalent of the following in MySQL, if the above data were to be in a table called "urls":

	SELECT catalog FROM urls GROUP BY catalog;

I would appreciate any advice as to how to query for this in Riak, or if this not feasible, then perhaps a suggestion for the best way to organize the data.

Thank you,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list