On Mon, Feb 25, 2013 at 2:19 PM, Wei Wang <welshw...@gmail.com> 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
default).

Mike McCandless

http://blog.mikemccandless.com

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to