lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <>
Subject Re: restricting search result
Date Sat, 04 Dec 2004 15:44:19 GMT
On Saturday 04 December 2004 15:44, Erik Hatcher wrote:
> On Dec 4, 2004, at 6:44 AM, Paul wrote:
> >> One way to restrict results is by using a Filter.
> >
> > but a filter is applied after the whole search is performed, isn't it?
> Incorrect.  A filter is applied *before* the search truly occurs - in 
> other words it reduces the search space.

Currently a filter is applied during search, after the document
score is computed, but before a document is added to the search results.

In practice, the score computation is much less work than the I/O, so
a filter does reduce the search space.

A filter might also be used to reduce the I/O for searching, but Lucene
doesn't do that now, probably because there was little to gain.

Paul Elschot.

P.S. The code doing the filtering is in, from line 97.

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

View raw message