lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: Does a Lucene Filter reduce the search space of the underlying Query?
Date Tue, 12 Nov 2013 23:49:58 GMT
Not  quite sure what you're after here. numDocs and docFreq are
index-wide numbers, they're not re-calculated on a per-query basis.

AFAIK, filters have nothing at all to do with these numbers.

Why do you care? What is it that you'd like to behave differently and
why would that be good? Or did I misunderstand your question entirely?

I'm sure others will jump in if I'm wrong here....


On Tue, Nov 12, 2013 at 6:29 PM, Gevorg Hari <> wrote:

> Hello!
> I'd like to have Filters reduce the search space of a Lucene Query. My
> experiments with DefaultSimilarity and different kind of filtering show
> that this does not happens. Specifically, I noticed that while calculating
> tf*idf the values that contribute to the idf (numDocs and docFreq) do not
> change even in the presence of filters.
> Are parameters like numDocs and docFreq calculated at index creation or are
> those retrieved before applying the filter? Is there a way to have the
> query being executed after the filter and with values that reflect the
> reduced search space?
> SO question here:
> Gist shportcut here:
> Thanks a lot!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message