lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Jain <>
Subject Re: CachedQuery
Date Thu, 10 Jun 2004 16:53:57 GMT
> How about the new FilteredQuery (added in the latest Lucene 1.4 release 
> - or earlier?).  I'm not sure it would suffice for that particular query 
> though.  It would, however, work well for:
>     foo OR (bar:yes AND xyz)
> as you could use a QueryFilter on bar:yes nested in a FilteredQuery with 
> a TermQuery for xyz, and then wrapped in a BooleanQuery as two 
> non-required clauses.  As for QueryParser... FilteredQuery is not 
> currently supported, although you could perhaps inject it by subclassing 
> (?).

Unfortunately it is also possible (and frequent) for the entire query to 
be nothing but


in which case the FilteredQuery approach wouldn't work, as far as I can 
see. On the other hand, I just realize that caching query objects won't 
do any good either, as most work is done when the score method of the 
query object is called (wild speculation).

Perhaps what I need is some kind of rule-based query optimizer...

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

View raw message