Re: Secondary indexes or Riak search ?

2017-02-13 Thread John Daily
> > A quick look at riak_test it seems that the `return_body` parameter is > generally supported for both HTTP and PB now. I wasn’t aware of that. I’m not sure into which releases the feature has made it, but bewarned: if it works at all, return_body only works for system indexes: $bucket and $

Re: Secondary indexes or Riak search ?

2017-02-13 Thread Alex Feng
Hi Russell, We will look into the links, thank you for the great help. Br, Aelx 2017-02-13 20:05 GMT+08:00 Russell Brown : > Hi Alex, > A quick look at riak_test it seems that the `return_body` parameter is > generally supported for both HTTP and PB now. I wasn’t aware of that. > > This test ex

Re: Secondary indexes or Riak search ?

2017-02-13 Thread Russell Brown
Hi Alex, A quick look at riak_test it seems that the `return_body` parameter is generally supported for both HTTP and PB now. I wasn’t aware of that. This test exercises the API. https://github.com/basho/riak_test/blob/develop/tests/verify_2i_returnbody.erl The `ref` returned from the link I ga

Re: Secondary indexes or Riak search ?

2017-02-13 Thread Alex Feng
Hi Russell, We have tried this, but it returns a reference(some number) only. We have googled and haven't found any clue about how to use this API. The API user guide doesn't say much about the "reference". What is the next step with the returned reference ? cs_bucket_fold(Pid::pid(), Bucket::

Re: Secondary indexes or Riak search ?

2017-02-13 Thread Russell Brown
If you look at the riak-erlang-client here https://github.com/basho/riak-erlang-client/blob/develop/src/riakc_pb_socket.erl#L1129 there is a client API call that was implemented for CS (riak s2, or whatever it is called, the large object store thingy that basho had) that will use the $keys inde

Re: Secondary indexes or Riak search ?

2017-02-12 Thread Alex Feng
Hi Russell, In your reply, you mentioned this, >> There is also the feature that can return the actual riak objects for a $keys index search, >>You can pack the index terms with data and return the terms in a query so that you don’t need a further object fetch (see >>return_terms in docs.) If I

Re: Secondary indexes or Riak search ?

2017-02-06 Thread Alex Feng
Hi Russell, It is really helpful, thank you a lot. We are suffering from solr crash now, are considering to switch to 2i. Br, Alex 2017-02-06 16:53 GMT+08:00 Russell Brown : > It’s worth noting that secondary indexes (2i) has some other advantages > over solr search. If you _can_ model your que

Re: Secondary indexes or Riak search ?

2017-02-06 Thread Russell Brown
It’s worth noting that secondary indexes (2i) has some other advantages over solr search. If you _can_ model your queries in 2i then I'd recommend it. Secondary indexes have a richer API than is currently documented, if you look at https://docs.basho.com/riak/1.4.7/dev/using/2i/ you’ll see that

Re: Secondary indexes or Riak search ?

2017-02-02 Thread Jason Voegele
Hi Alex, There is some info on this page that can help you decide: http://docs.basho.com/riak/kv/2.2.0/developing/usage/secondary-indexes/ See the sections titled "When to Use Secondary Indexes" and " When Not to Use Secondary Indexes". Sent from my iPad > On Feb 2, 2017, at 4:43 AM, Alex Fen

Secondary indexes or Riak search ?

2017-02-02 Thread Alex Feng
Hello Riak-users, I am currently using Riak search to do some queries, since my queries are very simple, it should be fulfilled by secondary indexes as well. So, my question is which one has better performance and less overhead, let's say both can fulfill the query requirement. Many thanks in adv