search schema caching bug?

Ryan Zezeski rzezeski at basho.com
Mon Apr 23 18:46:34 EDT 2012


Michael,

This is indeed a bug in Search.  You can clear the cache via the command
line like so:

    search-cmd clear-schema-cache

I filed an issue for this here:
https://github.com/basho/riak_search/issues/105

-Z

On Mon, Apr 23, 2012 at 6:13 PM, Michael Radford <mrad at blorf.com> wrote:

> In order to get case-insensitive indexing without stopwords, I'm
> trying to put a new search schema in place using the method from the
> Riak wiki:
>
> search-cmd set-schema [bucket] [schema file]
>
> This apparently succeeded, and search-cmd show-schema correctly
> returns my new schema. However, I was still getting
> stopword_not_allowed_in_query errors from searches. Looking at the
> code, I saw that the schema for parsing queries comes from
>
>    {ok, Schema} = riak_search_config:get_schema(IndexName),
>
> and sure enough, riak_search_config:get_schema for my bucket returns
> the old (default) schema. Looking at the source for that function, I
> see the schema is cached locally in an ets table, and then when
> search-cmd calls riak_search_config:put_raw_schema, it updates the
> local cache, but it seems like the other nodes' caches are not
> cleared. Is this a bug?
>
> As a workaround, it seems I can call riak_search_config:clear() on all
> the nodes after setting the new schema. (But if this is a bad idea for
> some reason, I'd like to know before trying this on a production
> system!)
>
> Mike
>
> _______________________________________________
> 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/20120423/dc7520e5/attachment.html>


More information about the riak-users mailing list