Class CachingWrapperFilter.DeletesMode

  extended by org.apache.lucene.util.Parameter
      extended by
All Implemented Interfaces:
Enclosing class:

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

Field Summary
static CachingWrapperFilter.DeletesMode DYNAMIC
static CachingWrapperFilter.DeletesMode IGNORE
static CachingWrapperFilter.DeletesMode RECACHE
Method Summary
Methods inherited from class org.apache.lucene.util.Parameter
readResolve, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail


public static CachingWrapperFilter.DeletesMode IGNORE


public static CachingWrapperFilter.DeletesMode RECACHE


public static CachingWrapperFilter.DeletesMode DYNAMIC

Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.