Riak Search 2.0 Questions
ryan at zinascii.com
Thu Jul 24 12:58:03 EDT 2014
On Jul 24, 2014, at 12:29 PM, Andrew Zeneski <andrew at andrewzeneski.com> wrote:
> Been checking out 2.0rc1 and am really excited about the new features (as I think most of us are). I had a couple of questions that I couldn't find answers to scanning the docs. Totally possible I missed it and if so, please feel free to direct me to the proper place.
> 1. Is there a way to remove a search index and schema?
No, currently you can only store/update a schema.
> 2. Do indexes just "reference" schemas?
An index has an associated schema. When the index is created locally on a node it retrieves that schema from an internal store built into Riak and writes it to the directory specific to that index. The index uses the schema stored in its local directory. Updates to the schema are not automatically propagated to the local file.
> More specifically, if I update a schema will those changes "propagate" to all indexes using that schema?
No, you will need to either need to delete the index and recreate or attach to the Riak console and run the following command:
This command will fetch the latest version of the associated schema for the index “index_name”, overwrite the index’s local schema, and then reload that index across the entire cluster.
Why is this all so awkward? Some of the gory details can be found in these two issues if you really want to know:
> The reason I ask is I've been experimenting with simple searching and found in the logs an error indexing a document due to unknown fields. I realized I missed the catch all dynamic field in my schema and updated it. After updating I ran the test again (after deleting any existing data) but the error persists. Leading me to believe that the schema isn't updating. But when I view the schema $RIAK_HOST/search/schema/testschema I see the updates.
Yes, the schema itself has been updated but, as explained above, it is once removed from the index and not automatically reloaded.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users