setting search schema

Alexander Sicular siculars at
Sat Oct 13 18:40:20 EDT 2012

Hi David, I'm thinking that you should write some bash-fu and use the search-cmd tool. You could do a search-cmd show-schema to check for a schema match. If you have to run search-cmd as root it stands to reason that you are running riak as root which I don't think is a good idea in general.

-Alexander Sicular


On Oct 13, 2012, at 3:32 PM, David Lowell wrote:

> 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
> _______________________________________________
> riak-users mailing list
> riak-users at

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

More information about the riak-users mailing list