riakc_pb_socket:search Issue

Ryan Zezeski rzezeski at basho.com
Mon May 2 20:38:39 EDT 2011


Muhammad,

Did you check the obvious?

1. You installed the Search KV pre-commit hook on player bucket?

2. Your schema includes the qname field?

3. You are using the proper extractor?

4. You inserted this record _after_ all of the above?

-Ryan

[Sent from my iPhone]

On May 2, 2011, at 12:42 PM, Muhammad Yousaf <muhammad.yousaf at live.com> wrote:

> Hi,
> 
> I dont know for some reasom my riakc_pb_socket:search command is not working 
> 
> this is what i am doing 
> 
> $ {ok,Client} =riakc_pb_socket:start_link("127.0.0.1",8087).       
> {ok,<0.199.0>}
> $ {ok,Obj}= riakc_pb_socket:get(Client, "player", "yousaf").
> {ok,{riakc_obj,"player","yousaf",
>                <<107,206,97,96,96,96,204,96,202,5,82,44,204,210,252,103,
>                  50,152,18,25,243,88,25,...>>,
>                [{{dict,3,16,16,8,80,48,
>                        {[],[],[],[],[],[],[],[],[],[],[],[],...},
>                        {{[],[],[],[],[],[],[],[],[],[],...}}},
>                  <<131,108,0,0,0,6,104,2,109,0,0,0,10,112,108,97,121,101,
>                    114,...>>}],
>                undefined,undefined}}
> $  binary_to_term(riakc_obj:get_value(Obj)).
> [{<<"playername">>,<<"yousaf">>},
>  {<<"qname">>,<<"world1">>},
>  {<<"score">>,<<"0">>},
>  {<<"itemname">>,<<"snowballs">>},
>  {<<"itemvalue">>,<<"1000">>},
>  {<<"date">>,<<"2010-04-20">>}]
> 
> riakc_pb_socket:search(Client, <<"player">>, "qname:world1").    
> {ok,[]}
> riakc_pb_socket:search(Client, <<"player">>, <<"qname:world1">>).
> {ok,[]}
> 
> 
> i am alway getting [] what ever i am searching for 
> 
> any idea what i am doing wrong??
> 
> thanks in advance
> 
> Regards,
> 
> Muhammad Yousaf
> 
> 
> _______________________________________________
> 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/20110502/9d0a883e/attachment.html>


More information about the riak-users mailing list