lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: operator precedence
Date Tue, 08 Apr 2008 02:09:52 GMT

:   What is the default operator precedence between AND and OR in SOLR?  For
: example if I type a query "A OR B AND C", will it be treated as "(A OR B)
: AND C"  OR "A OR (B AND C)"

Strictly speaking: neither.

AND and OR are just aliases for setting the MUST and SHOULD properties of 
the clauses on both sides, when used like your examples the AND "wins" 
(i believe) because it comes second.  "C AND B OR A" would have differnet 

The wiki is under going maintence right now, but the google cache of this 
page has some more info...


View raw message