I see my tables didn't come through so well. Here's (I hope) a plain
text version:

I understand that it would be best to have a UI that mapped lists of
terms to MUST, MUST_NOT and SHOULD, but I'm currently constrained to
using the QueryParser with boolean operators.

Given that, I was thinking that the addition of "*:*" (in 2.1) to
represent MatchAllDocsQuery might help solve:

"  NOT Chair " is the problem ... you can't have a negative
clause in isolation by itself -- it doesn't make sense because
there isn't anything positively selecting results for you to then
exclude results from.

by making that: "*:* NOT Chair"

To test, I indexed these documents:

DocID  Body Value
-----  ----------
 0     A B C
 1     A B C D
 2     A C D
 3     B C D
 4     C D
 5     B
                                         Expected Actual
Query           Parsed As                 Matches  Matches
-----           ---------                 -------- -------
NOT B           -body:B                     2, 4   <none>
*:* NOT B       MatchAllDocsQuery -body:B   2, 4   2, 4, 5
*.* AND NOT B   +MatchAllDocsQuery -body:B  2, 4   2, 4, 5

Can someone explain why doc 5 is matched for both "*:* NOT B" and
"*.* AND NOT B"?

Are my Expected Matches incorrect?

Thanks, david

Reply via email to