Mike Klaas elaborates on syntax:
+(-A +B) -> must match (-A +B) -> must contain B and must not contain A -(-A +B) -> must not match (-A +B) -> must not (match B and not contain A)
Ok, the take-away from this I'm getting is that these clauses read very much like English and behave just the same. Good, I can follow that. Very clear example, Mike; thanks. I didn't realize that things reduced in the second case as they did. This helped a lot. Chris Hostetter (Hoss) digs deeper regarding the creation of a BooleanQuery:
This is a BooleanQuery containing 6 SHOULD clauses... A B C D E F This is a BooleanQuery contain 2 SHOULD clauses, each containing 3 SHOULD clauses... (A B C) (D E F) ...those two queries will match on the same set of documents, but the scores will be very different because of the way the coord factor comes into play for *each* BooleanQuery in the hierarchy.
Hoss, again your insights have benefited my understanding. What I'm getting here is that it's not that I'm finding different documents, but rather it's the same set and they will be ranked differently. Can you point me at a resource that explains the ranking and coord factors? I'm trying to understand scoring better. Going to the BooleanQuery documentation seemed more about function signatures for creating and using the object rather than explaining what it was doing and how such decisions affected the larger picture. http://lucene.apache.org/java/docs/api/org/apache/lucene/search/BooleanQuery.html Seems that most online tutorials are about selecting documents, and I think what you've led me to believe is that I'm more interested in how things are ranked. But, more importantly, I think with the above information this explains the original question: Does +(A1 A2 A3) +(B1 B2 B3) -(C1 C2 C3) find documents that have at least one A -and- at least one B, but never any Cs? ...to which I'm now given to understand the answer is yes. And understand why. Thanks for everyone's help at patience! -wls