Riak Search. Ranges. Integer Analyzer Factory.

Ryan Zezeski rzezeski at basho.com
Mon Aug 20 12:42:13 EDT 2012


On Mon, Aug 20, 2012 at 12:29 PM, Vladimir Shapovalov
<shapovalov at gmail.com>wrote:

> Hi Ryan,
>
> Thank you, I didn't know that the data stays unchanged. Similar to 2i.
>
> While executing curl request I get this record in crash.log:
> ------------------------------------------------------------------
> 2012-08-20 18:12:22 =CRASH REPORT====
>   crasher:
>     initial call: mochiweb_acceptor:init/3
>     pid: <0.138.0>
>     registered_name: []
>     exception error: no case clause matching {ok,{http_error,"GET
> /solr/my_index/select?q=price:[100 TO 200] HTTP/1.1\r\n"},<<>>}
>       in function  mochiweb_http:request/3
>       in call from proc_lib:init_p_do_apply/3
>     ancestors: ['http_localhost:8098',riak_core_sup,<0.105.0>]
>     messages: []
>     links: [<0.136.0>,#Port<0.6518>]
>     dictionary: []
>     trap_exit: false
>     status: running
>     heap_size: 610
>     stack_size: 24
>     reductions: 533
>   neighbours:
> ------------------------------------------------------------------
>

You need to encode the url as you have illegal characters in there.


>
> I've tried it on the command line with the no success:
>
> $: /usr/sbin/search-cmd search my_index "price:[100 TO 200]"
>

You stored the field as `price_int` and you are querying `price`.  Search
doesn't strip suffixes like 2i.  It is just a convention for a dynamic
field.  You could add an explicit `price` field with the integer analyzer
or you need to search against the `price_int` field.

-Z
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20120820/02fc7863/attachment.html>


More information about the riak-users mailing list