Riak search queries via the java client

Engel Sanchez engel.sanchez at gmail.com
Sun Aug 26 13:12:25 EDT 2012


Hi Oved. If Riak search is anything like Lucene search, the correct way to
query that would be:

Name:c1 OR Name:c2

Did you try that?  I believe this also works in lucene: Name:(c1 OR c2)

Sorry to answer without actually trying this on Riak, just from my Lucene
experience.  But it's worth a try. Any attribute without a prefix is
interpreted as that value in the default search field.

Cheers

Date: Sun, 26 Aug 2012 07:24:21 +0000

> From: Oved Machlev <omachlev at interwise.com>
> To: "riak-users at lists.basho.com" <riak-users at lists.basho.com>
> Subject: Riak search queries via the java client
> Message-ID:
>         <
> 7F9AB8052E563043BF5218BB9ADE257F365EE158 at ISRTLVEXMX2.interwise.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi,
> I am trying to perform queries using the OR operator as following:
>   MapReduceResult result = riakClient.
>             mapReduce("some_bucket", "Name:c1 OR c2").
>             addMapPhase(new NamedJSFunction("Riak.mapValuesJson"), true).
>             execute();
>
> I only get the 1st object in the query (where name='c1'). If I change the
> order of the query (i.e. Name:c2 OR c1) again I get only the first object
> in query (where name='c2').
> is the OR operator (and other query operators) supported in the java
> client?
>
>
>
> Thanks,
> Oved Machlev
> ____________________________
> Get AT&T Connect for Mobile now!
> Android<https://play.google.com/store/apps/details?id=com.att.connect> |
> iPhone<http://itunes.apple.com/us/app/at-t-connect-mobile/id318798264?mt=8>
> | iPad<
> http://itunes.apple.com/il/app/at-t-connect-mobile-application/id459888209?mt=8>
> | BB<http://downloads.uc.att.com/BB/Public/Latest/En/KB/att_connect.jad>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20120826/19056623/attachment.html>


More information about the riak-users mailing list