hey everyone,
i just started off with using riak search. (i have some basic riak
experience) and i don't know how to use the erlang api for riak to do search
queries.
what i've done so far
------------------------------
I have successfully installed the KV hook, put in a json document,
and also used the search-cmd to retrieve something. for reference i put in
the json
{
firstname:"John",
lastName:"Smith"
}
with the command curl -X PUT http://127.0.0.1:8098/riak/test/123 -H
"Content-Type: application/json" -d @test.json
to retrieve something i by navigating to riah search's bin, then
./search-cmd search json firstname:John
the above works well.
now i'm buildling an aplpication with webmachine / erlang. and i want to be
able to perform searches as well.
the wiki indicates that the Erlang api should support this
https://wiki.basho.com/display/RIAK/Riak+Search+-+Querying
looking at riakc_pb_socket.erl, i see there is a search method that has the
signature search(Pid, Bucket, SearchQuery)
so what exactly is SearchQuery, how is it supposed to look like. So it just
gets passed into a mapred_search?
I'm confused on how this works. Can someone please provide a simple
example, of how i can search for say firstname:John with the json above?
any help would be greatly appreciated.
--
Carson Li
Liquid Analytics
[email protected]
647-273-1024
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com