What up Harshal,

Since at least 0.13.x, the solr interface has supported both AND and OR
queries just fine, even in combination.

{a: "foo"}
{a: "bar"}
{a: ["foo", "bar"]}
{a: "bar baz"}

curl "http://localhost:8098/solr/bucket_name/select?wt=json&q=a:foo+OR+a:bar
"
(4 results)

curl "
http://localhost:8098/solr/bucket_name/select?wt=json&q=a:foo+AND+a:bar";
(1 result)

curl "
http://localhost:8098/solr/bucket_name/select?wt=json&q=a:foo+AND+(a:bar+OR+a:baz)
"
(2 results)

- Kev
c: +001 (650) 521-7791


On Wed, Sep 28, 2011 at 11:19 AM, Harshal Dhir <harshal.d...@solutionset.com
> wrote:

> Hi,
>
> We were wondering what is the best possible way to perform "AND / OR"
> queries in RiakSearch. It seems OR works but how do I perform an AND on the
> same field.
>
> For example:
>
> DATA:
>
> {a : "test" }  {a: "test"} {a: "test2"}
>
> "test" OR "test2" would return both. But, we are looking to return AND
> query result, since obviously "test2" AND "test" won't return anything.
>
> So, we are looking for guidance on how do we store data in such a way that
> AND queries would be possible.
>
> Whats the best recommended approach both prior to 1.0 and 1.0 going
> forward.
>
>
> Thanks
> Harshal
>
>
> *
>
> *
>
>
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to