org.apache.lucene.search
Class CachingWrapperFilter.DeletesMode
java.lang.Object
org.apache.lucene.util.Parameter
org.apache.lucene.search.CachingWrapperFilter.DeletesMode
- All Implemented Interfaces:
- Serializable
- Enclosing class:
- CachingWrapperFilter
public static final class CachingWrapperFilter.DeletesMode
- extends Parameter
- implements Serializable
Expert: Specifies how new deletions against a reopened
reader should be handled.
The default is IGNORE, which means the cache entry
will be re-used for a given segment, even when that
segment has been reopened due to changes in deletions.
This is a big performance gain, especially with
near-real-timer readers, since you don't hit a cache
miss on every reopened reader for prior segments.
However, in some cases this can cause invalid query
results, allowing deleted documents to be returned.
This only happens if the main query does not rule out
deleted documents on its own, such as a toplevel
ConstantScoreQuery. To fix this, use RECACHE to
re-create the cached filter (at a higher per-reopen
cost, but at faster subsequent search performance), or
use DYNAMIC to dynamically intersect deleted docs (fast
reopen time but some hit to search performance).
- See Also:
- Serialized Form
IGNORE
public static CachingWrapperFilter.DeletesMode IGNORE
RECACHE
public static CachingWrapperFilter.DeletesMode RECACHE
DYNAMIC
public static CachingWrapperFilter.DeletesMode DYNAMIC
Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.