Riak search and secondary indices in 1.0 clarification

Alexander Sicular siculars at gmail.com
Fri Sep 23 12:18:26 EDT 2011

Hello All,

I've been fumbling through the wiki and the various blog posts, emails, announcements and want to just outline my understanding of search/indices in 1.0. Let me outline them:

- Riak search is not enabled by default 
- To enable riak search set enabled to true here: https://github.com/basho/riak/blob/riak-1.0.0rc1/rel/files/app.config#L145
- To enable search on a bucket you must augment the bucket properties by sending the bucket the following json: { "search" : true }
- Riak search will work regardless of which backend your data is in because it keeps its data in a separate bucket which uses merge_index as the backend

(this is where it gets fuzzy)
- Riak search and secondary indices may be used in the same cluster at the same time and even on the same bucket at the same time.
- Secondary indices are "enabled" on a per key basis by utilizing the correct header syntax.
- In order for data to have a secondary index the backend for that bucket needs to be leveldb because index data is kept in the same bucket as key/value data[0]
- in order for you to be able to use leveldb, you need to do one of the following:
	- either direct riak to use leveldb as the default backend here: https://github.com/basho/riak/blob/riak-1.0.0rc1/rel/files/app.config#L46 
	- or enable multiple backends in the config file 
	- or specifically indicate the backend in the bucket prop (which still requires the backend to be made available in app.config)

In short, is there a canonical reference somewhere that I'm jut missing? 

Thanks gang,

-Alexander Sicular


[0] "LevelDB stores data in a defined order, exactly what Secondary Indexes needed, and it is actually versatile enough to manage both the index data AND the object's value."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110923/7b549564/attachment.html>

More information about the riak-users mailing list