Hi Yang,

Please read the "Indexing Values" section of this document, and check
out the Erlang sample code there:

http://docs.basho.com/riak/latest/dev/using/search/
--
Luke Bakken
Engineer / CSE
lbak...@basho.com


On Sun, Aug 31, 2014 at 11:50 AM, Yang Zhenguo <yangzhen...@gmail.com> wrote:
> Hi all,
>
> I have a question on record search.
>
> First, the value of my bucket is record.
>
> #solution{
>         user_id = LoginId,
>         problem_id = ProblemId,
>         language = Language
> }.
>
> Secondly, got riakc_obj
> RSolution = riakc_obj:new(SolutionBucket, SolutionKey, Solution)
>
> Finally,
> riakc_pb_socket:put(ClientPid, RSolution1)
>
> Howevery, I cant search it via the following command:
> riakc_pb_socket:search(Pid, <<"sln_index">>, <<"language:*">>).
>
> Any suggestion?
>
> BTW, I can get the following result:
> 10> riakc_pb_socket:search(Pid, <<"sln_index">>, <<"*:*">>).
> {ok,{search_results,[{<<"sln_index">>,
>                       [{<<"score">>,<<"1.00000000000000000000e+00">>},
>                        {<<"_yz_rb">>,<<"Solutions_a">>},
>                        {<<"_yz_rt">>,<<"solution_t">>},
>                        {<<"_yz_rk">>,<<"yang_20140901T02:38:17">>},
>                        {<<"_yz_id">>,
>
> <<"1*solution_t*Solutions_a*yang_20140901T02:38:17*48">>}]}],
>
> Thanks in advance.
>
> --
> Zhenguo Yang
> www.prinbit.com
>
> _______________________________________________
> 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