lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: Lucene filter questions
Date Tue, 26 Feb 2013 00:01:23 GMT
On Mon, Feb 25, 2013 at 2:19 PM, Wei Wang <> wrote:
> Cool. Thanks, Ian.
> I will try FieldCacheTermsFilter.
> A related question. Occasionally, we would like only use filtering
> conditions instead of ranking/scoring. Right now I use
> MatchAllDocsQuery with TermsFilter. Based on the code of
> MatchAllDocsQuery, it seems the class enumerates all doc IDs up to
> maxDoc. If we are able to interpret bitmap of filters directly, it may
> be more efficient.
> Can we use Filter to return list of docs or count of docs directly?

Use ConstantScoreQuery: it turns a Filter into a Query, where every
doc gets a score equal to the ConstantScoreQuery.setBoost (1.0 by

Mike McCandless

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

View raw message