When coding LUCENE-2919 (PKIndexSplitter), Mike and me had the idea, how to effectively apply filters on the lowest level (before query execution). This is very useful for e.g. security Filters that simply hide some documents. Currently when you apply the filter after searching, lots of useless work was done like scoring filtered documents, iterating term positions (for Phrases),...
This patch will provide a FilterIndexReader subclass (4.0 only, 3.x is too complicated to implement), that hides filtered documents by returning them in getDeletedDocs(). In contrast to LUCENE-2919, the filtering will work on per-segment (without SlowMultiReaderWrapper), so per segment search keeps available and reopening can be done very efficient, as the filter is only calculated on openeing new or changed segments.
This filter should improve use-cases where the filter can be applied one time before all queries (like security filters) on (re-)opening the IndexReader.
此文章介绍了如何通过在LUCENE-2919中实现FilterIndexReader子类来优化全文检索性能,该类在索引打开前即应用过滤器,提高效率并简化搜索过程。
7395

被折叠的 条评论
为什么被折叠?



