You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by duddy67 <sa...@littlemarc.com> on 2011/07/05 20:15:38 UTC

The OR operator in a query ?

Hi all,

Someone could tell me what is the OR syntax in SOLR and how to use it in a
search query ?
I tried:  

fq=sometag:1+sometag:5
fq=sometag:[1+5]
fq=sometag:[1OR5]
fq=sometag:1+5

and many more but impossible to get what I want.


Thanks for advance



--
View this message in context: http://lucene.472066.n3.nabble.com/The-OR-operator-in-a-query-tp3141843p3141843.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: The OR operator in a query ?

Posted by duddy67 <sa...@littlemarc.com>.
Thanks for your response. I'll check this. 

--
View this message in context: http://lucene.472066.n3.nabble.com/The-OR-operator-in-a-query-tp3141843p3141916.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: The OR operator in a query ?

Posted by Juan Grande <ju...@gmail.com>.
Hi,

This two are valid and equivalent:

   - fq=sometag:1 OR sometag:5
   - fq=sometag:(1 OR 5)

Also, beware that fq defines a filter query, which is different from a
regular query (http://wiki.apache.org/solr/CommonQueryParameters#fq). For
more details on the query syntax see
http://lucene.apache.org/java/2_4_0/queryparsersyntax.html

Regards,

*Juan*



On Tue, Jul 5, 2011 at 3:15 PM, duddy67 <sa...@littlemarc.com> wrote:

> Hi all,
>
> Someone could tell me what is the OR syntax in SOLR and how to use it in a
> search query ?
> I tried:
>
> fq=sometag:1+sometag:5
> fq=sometag:[1+5]
> fq=sometag:[1OR5]
> fq=sometag:1+5
>
> and many more but impossible to get what I want.
>
>
> Thanks for advance
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/The-OR-operator-in-a-query-tp3141843p3141843.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>