lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: query performance behavior not as expected
Date Tue, 30 Aug 2005 21:04:09 GMT

: The obvious answer here might be to use a filter for the first
: (required) clause and then query again using that filter for the other
: terms.  The problem I forsee with that solution is that I can't easily
: re-use the filters because of the sheer number of combinations of terms
: and the need to re-open my readers/searchers every few minutes to expose
: the steady stream of updates to querying on a regular basis.  As I
: understand it re-using a filter (rather than creating it, using it, and
: discarding it) is integral to it's value as a time saver and thus maybe
: not appropriate in this case.

In my opinion, the second integral aspect ot using a Filter is when you
want to limit which documents are returned without affecting the scores of
the documents -- as Paul pointed out in his reply, that may not be what
you want.

If scores are not important to you (ie: you are sorting by something else)
or if you are happy to have the score only influenced by the "optional"
parts of your initial query, then you can still get abig win out of using
Filters -- the key is to build a filter for each of the individual
required terms, and cache those using CacheWrappingFilter (so the number
of combinations is irrelevant to the cache size) and then use something
like a ChainedFilter to build up the specific combination you need to
Filter you search...


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

View raw message