lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject MatchAllDocs in BooleanQuery.rewrite
Date Fri, 02 Feb 2007 06:26:46 GMT

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?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message