Hi Muhammad,

Riak Search uses Lucene Query syntax. Because Lucene syntax is meant for
text searching, doing a 'greater than' query is somewhat convoluted, but
still possible:
*riakc_pb_socket:search(Client, "player", "score: {500 TO 9999999999]")*
*
*
That tells Riak Search to query the "players" index, looking for documents
with a field of "score" that is from 500 (exclusive) to 99999999
(inclusive). Notice the curly brace on the left vs. the bracket on the
right. A curly brace is for exclusive ranges, a bracket for inclusive
ranges.

Hope that helps,

Best,
Rusty


On Tue, Jun 7, 2011 at 7:08 AM, Muhammad Yousaf <muhammad.you...@live.com>wrote:

>  Hi,
> I am using Riaksearch with erlang PB client by following  "
> https://github.com/basho/riak-erlang-client/"; my schema is
>
> {
>     schema,
>     [
>         {version, "1.1"},
>         {default_field, "playername"},
>         {default_op, "or"},
>         {n_val, 3},
>         {analyzer_factory, {erlang, text_analyzers,
> standard_analyzer_factory}}
>     ],
>     [
>         {field, [
>             {name, "score"},
>             {type, integer},
>             {padding_size, 10},
>             {analyzer_factory, {erlang, text_analyzers,
> integer_analyzer_factory}}
>         ]},
>     ]
> }.
>
> i am populating my bucket in format like
> Bucket,Key,[{key,value},{key,value},{score,200}]
>
>
> can I find keys greater then value for example 500 by using
>
> riakc_pb_socket:search(Client, "player", score > 500)
>
> i tried but with no luck. If yes then how? if not then how can i do that ?
>
> thanks in advance and looking forward for ideas?
>
>
> Regards,
>
> Muhammad Yousaf
>
>
>
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to