Riak Search. Ranges. Integer Analyzer Factory.

Vladimir Shapovalov shapovalov at gmail.com
Mon Aug 20 04:22:43 EDT 2012


Hi Alexander,

thanks for prompt reply.
Didn't work...
And the strings aren't padded in my case. I still have 100 or 200 as values
after insert.

Thanks
Vladimir

On Mon, Aug 20, 2012 at 1:03 AM, Alexander Sicular <siculars at gmail.com>wrote:

> Ints are stored as 10 char padded strings. So int:11 is "0000000011". So
> 200 to 400 would be like [0000000200 TO 0000000400]. Try that.
>
>
> @siculars
> http://siculars.posterous.com
>
> Sent from my iRotaryPhone
>
> On Aug 19, 2012, at 18:11, Vladimir Shapovalov <shapovalov at gmail.com>
> wrote:
>
> Hi all,
>
> Does anybody know, how to query integers with wildcards and ranges?
> Currently I can get result with exact match only.
>
> I've definded keynames with suffix *_int* (price_int).
> I use integer_analyzer_factory:
> ...
>         {dynamic_field, [
>             {name, "*_int"},
>             {type, integer},
>             {analyzer_factory, {erlang, text_analyzers,
> integer_analyzer_factory}}
>         ]},
> ...
>
> I use curl for:
>
> $: curl --globoff -v "
> http://localhost:8098/solr/bucket/select?wt=json&start=0&rows=0&*q=price_int:[100
> TO 200]*" - no results.
>
> $: curl --globoff -v "
> http://localhost:8098/solr/bucket/select?wt=json&start=0&rows=0&*
> q=price_int:20**" - no results.
>
> But if I change query to "*q=price_int:200"* I get result as expected.
>
> $: curl --globoff -v "
> http://localhost:8098/solr/bucket/select?wt=json&start=0&rows=0&*
> q=price_int:200*" - is available.
>
> So there is definitelly a key with price:200 stored.
>
> Could someone tell me what I'm doing wrong and how to deal with integers
> in riak-context correctly?
>
> Thanks a lot in advance!
> Vladimir
>
> _______________________________________________
> 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/20120820/03544854/attachment.html>


More information about the riak-users mailing list