lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Armbrust, Daniel C." <Armbrust.Dan...@mayo.edu>
Subject Question on the FAQ list with filters
Date Wed, 27 Mar 2002 21:52:21 GMT
>From the FAQ:

***
16. What is filtering and how is it performed ?

Filtering means imposing additional restriction on the hit list to eliminate
hits that otherwise would be included in the search results. There are two
ways to filter hits:

* Search Query - in this approach, provide your custom filter object to the
when you call the search() method. This filter will be called exactly once
to evaluate every document that resulted in non zero score.

* Selective Collection - in this approach you perform the regular search and
when you get back the hit list, collect only those that matches your
filtering criteria. In this approach, your filter is called only for hits
that returned by the search method which may be only a subset of the non
zero matches (useful when evaluating your search filter is expensive). 

***

I don't see why the second way is useful.  Yes, your filter is called only
for hits that got returned by the search method, but aren't those the same
hits that the search() method would run through the filter?  Maybe I'm just
not reading it close enough.

Is my assumption that it is faster to provide a filter to the search()
method, than to do a selective collation correct?  





--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message