How to do faceted search?

Eric Redmond eredmond at basho.com
Tue Sep 2 07:15:55 EDT 2014


Yang,

The current Riak clients don't support the full range of Solr queries. In order to remain backward compatible with the old search protocol buffers, they only support a subset of search options. For new search options, such as facets or geolocation, you'll have to make HTTP queries.

QueryURL = "http://localhost:8098/solr/MY_INDEX/select?wt=jso&nq=name:a&facet=true",
{ok, "200", _, JSONBody} = ibrowse:send_req(QueryURL, [], get, []),
JSONBody.

Eric


On Sep 1, 2014, at 6:22 PM, Yang Zhenguo <yangzhenguo at gmail.com> wrote:

> Hi,
> 
> I have a question on faceted search.
> 
> I am using riakc client for searching in riak. And I only what to get the facet of query, how to do that? I am trying the following command, but it returns "bad arg"
> 
> riakc_pb_socket:search(ClientPid, ?SOLUTION_INDEX, <<"name:a">>, [{facet, true}]).
> 
> Thanks in advance.
> Regards,
> -- 
> Zhenguo Yang
> www.prinbit.com
> _______________________________________________
> 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/20140902/495d4724/attachment.html>


More information about the riak-users mailing list