Future roadmap for indexed queries?

Rusty Klophaus rusty at basho.com
Sat Feb 27 08:03:37 EST 2010

Hi John,

In the near future, we are planning to add a pre-commit "hook", specified at
a bucket level. This would provide the building blocks necessary to keep an
index up to date when an object is stored in Riak. Eventually, I expect to
see frameworks and other tools use the hook to allow easy indexing.

Until that is in place, the best approach for querying depends on the shape
of your data:

If you are searching for data through relations in a hierarchy, and you know
the starting point of that hierarchy, then you should add tagged links to
your objects and use linkwalking. If you need to search in a hierarchy, but
need more flexibility than links and tags can provide, then you can use
map/reduce functionality. By "starting point", I mean that you know the
exact object or objects under which you would like to query.

If your queries are not relational/hierarchical and you don't know the
starting point in advance, then your best approach would be to mimic the
hook feature described above, and build up your index by hand in a separate
Riak object. You could do this in your application when an object is stored
(which requires extra hops to Riak), or you can use a background process to
do this using list-keys, which means there will be some lag between when
your data is stored and when the index is updated. (Keep in mind that
list-keys can be an expensive operation, which is why it should be a
background process.)


On Fri, Feb 26, 2010 at 4:53 PM, John Lynch <john at rigelgroupllc.com> wrote:

> I am preparing to give a talk on Riak next week to a local Ruby user group
> here in San Diego, and wanted to get your thoughts on the future of Riak.
> While in its current form it is awesome for loads of use cases, it falls
> short in the whole querying department, at least as it relates to building
> typical web applications. I get the map/reduce features, and the link
> features, but are there any plans to build in indexed query capabilities, a
> la MongoDB?  Mongo obviously has an easier time of this since it knows
> exactly what format your data is in (BSON). Or, is this something you would
> leave to third-parties to build as part of an ORM framework like Ripple, for
> example, which would have a better idea of the shape of the data and could
> create/maintain indexes accordingly...
> Regards,
> John Lynch, CTO
> Rigel Group, LLC
> john at rigelgroupllc.com
> _______________________________________________
> 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/20100227/71de06af/attachment.html>

More information about the riak-users mailing list