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. Regards, Paul Elschot. P.S. The code doing the filtering is in IndexSearcher.java, from line 97. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
