setting search schema

David Lowell dave at go2ctv.com
Sat Oct 13 18:32:12 EDT 2012


My software needs to be able to set a custom schema in Riak for indexing json objects. To make deploying my software easy, what I think I'd like to be able to do is:

- on app startup, test whether the schema has been added for index already
- if not, set the schema for my index

It does appear that I can test whether a schema exists for my index with (from python):

	client.bucket('_rs_schema').get(INDEX_NAME).exists()

However, the docs warn against writing any schemas into the _rs_schema bucket directly. The only other interface documented for assigning schemas is the "search-cmd" command line tool. I conclude there does not appear to be a supported way to assign schemas to indexes from code.

I could have my code invoke the command line tools to assign this schema, but then my code would have to run as root.

So, am I missing something? How do other people manage to manage the schemas for their indexes?

Thanks for the help,

Dave

--
Dave Lowell
dave at connectv.com

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


More information about the riak-users mailing list