Closed phurni closed 12 years ago
So if we have four documents:
Then the search: cat -dog -bird Should return documents 2, 3 and 4?
@dougal No, my understanding of this query is: documents with cat
but without dog
or without bird
.
So it should yiled only document 4.
Ok, since the semantics of those kind of queries are open to interpretations, I took a different approach. I refactored the SearchIndex
to be able to default to OR between query terms.
Forget about this PR, I'll send a new one with the new code which will not break existing queries.
When querying with multiple negative words, I think that the expected behaviour is to match documents without any of them, not all of them.
Example:
dog -cat -bird
should match all documents withdog
but withoutcat
orbird
Currently it matches all documents with
dog
withoutcat
ANDbird