6 apr 2009 kl. 15.47 skrev Lebiram:

I am thinking of adding search filters to my application thinking that they would more efficient.

Can anyone explain what lucene does with search filters?

Like, what generally happens when calling search()

A filter is a bitset, one bit per document in the index, used to tell Lucene to exclude these documents when processing the query. Generally it will only speed up your query if you can reuse the filter as it probably was created using the query it replaced.

This is what http://wiki.apache.org/jakarta-lucene/ ImproveSearchingSpeed says about filters:
        
Consider using filters.
It can be much more efficient to restrict results to a part of the index using a cached bit set filter rather than using a query clause. This is especially true for restrictions that match a great number of documents of a large index. Filters are typically used to restrict the results to a category but could in many cases be used to replace any query clause. One difference between using a Query and a Filter is that the Query has an impact on the score while a Filter does not.


      karl

---------------------------------------------------------------------
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