You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Chris Hostetter <ho...@fucit.org> on 2007/02/02 07:26:46 UTC

MatchAllDocs in BooleanQuery.rewrite

more then once, people have suggested that QueryParser should either throw
and Exception or implicitly put a MatchAllDocsQuery in any BooleanQuery it
produces when the string it's parsing contains entirely negative clauses.

I've argued against this idea because QueryParser doesn't know how the
Query it's producing is oging to be used ... many people (myself included)
use it to parse some user input, which they then combine with other
automaticaly constructed clauses -- and the MatchAllDocsQuery would be a
bad idea.

replying to question about this tonight, it occured to me that
BooleanQuery.rewrite might be a feasible place for code that automaticly
includes a MatchAllDocsQuery when all clauses are negative ... are there
any legitimate usecases for calling rewrite other then when a Searcher is
about to execute the query?


-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org