[email protected]
[Top] [All Lists]

Re: svn commit: r332747 - in /lucene/java/trunk: ./ src/java/org/apache/

Subject: Re: svn commit: r332747 - in /lucene/java/trunk: ./ src/java/org/apache/lucene/search/regex/ src/test/org/apache/lucene/search/regex/
From: Paul Elschot
Date: Wed, 16 Nov 2005 08:37:23 +0100
On Tuesday 15 November 2005 20:30, Doug Cutting wrote:
> Paul Elschot wrote:
> > Not using the document term frequencies in PrefixQuery would still
> > leave these as a surprise factor between PrefixQuery and TermQuery.
> Should we dynamically decide to switch to FieldNormQuery when 
> BooleanQuery.maxClauseCount is exceeded?  That way queries that 
> currently work would continue to work, and queries that formerly failed 
> would now work.  How complicated would this be to implement?

Why not leave that decision to the program using the query?
Something like this:
- catch the TooManyClauses exception,
-  adapt (the offending parts of) the query to make these use
   a FieldNormQuery, 
- retry with a warning to the provider of the query that 
  the term frequencies have been ignored.

The only disadvantage of this is that the term expansion
during rewrite has to be redone.
Also, when enough terms are involved, they might still cause
a memory problem because they are all needed at the same

Paul Elschot

To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

<Prev in Thread] Current Thread [Next in Thread>