## org.apache.lucene.search
Class CachingWrapperFilter.DeletesMode

    java.lang.Object
      org.apache.lucene.util.Parameter
          org.apache.lucene.search.CachingWrapperFilter.DeletesMode

All Implemented Interfaces:
  java.io.Serializable

Enclosing class:
  CachingWrapperFilter

    public static final class CachingWrapperFilter.DeletesMode

extends Parameter
implements java.io.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

### IGNORE

    public static CachingWrapperFilter.DeletesMode IGNORE

### RECACHE

    public static CachingWrapperFilter.DeletesMode RECACHE

### DYNAMIC

    public static CachingWrapperFilter.DeletesMode DYNAMIC

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