: Solr/Lucene do not employ boolean logic. See Hossman’s excellent post:
: 
: https://lucidworks.com/post/why-not-and-or-and-not/
: 
: Until you internalize this rather subtle difference, you’ll be surprised. A 
lot ;).
: 
: You can make query parsing look a lot like boolean logic by carefully using 
parentheses…

Yup.  and to circle back to the original request...

: >>>>>>> id, name_s, age_i
: >>>>>>> 1, a, 10
: >>>>>>> 2, b, 10
: >>>>>>> Use the following query syntax:
: >>>>>>> -name_s:a OR age_i:10

tht says "Find all docs where age==10, then exclude docs where name==a

If what you want is "all docs where name!=a, combined with all docs where 
age==10" that would be...

        (*:* -name_s:a) age_i:10


-Hoss
http://www.lucidworks.com/

Reply via email to