Strange wildcard behavior

Elias Levy fearsome.lucidity at gmail.com
Fri Nov 11 02:21:41 EST 2011


I am seeing some strange someone behavior that maybe someone can explain.

Using a modified default search schema, so that these fields are tokenized
using the noop analyzer, if I index something like:

{"i":{"bg":[{"dnm":"generic"},{"dnm":"onlinegamesfva"},{"dnm":"8ffa6"}]}}


and I try searching for it with

search-cmd search mybucket i_bg_dnm:'generic'


it finds no matches.

But if I search for:

search-cmd search mybucket i_bg_dnm:'generic*'


it finds the document.

What gives?  Why does the specific match returns no matches but the wild
card query does?

Oddly, the output of search-cmd shows:

index/id: mybucket/mykey2
<<"i_bg_dnm">> -> <<"generic onlinegamesfva 8ffa6">>


which appears to show that the values of key dnm in each dict in the array
have been concatenated with spaces in between, which would explain the lack
of a exact match, but matches with the wildcard.

The example of indexing dict in an array that Rusty sent in reply to my
message on that topic does not show this behavior.  Searching for a
specific match returns a result, and searching with a wild card does not
show the values of the matching fields in the dicts in the array being
concatenated in this way:

search-cmd search mybucket menu_popup_menuitem_value:'Ne*'

index/id: mybucket/mykey1
<<"menu_popup_menuitem_value">> -> <<"New">>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20111110/0715b6fd/attachment.html>


More information about the riak-users mailing list