public static enum CachingWrapperFilter.DeletesMode extends Enum<CachingWrapperFilter.DeletesMode>
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).
Modifier and Type | Method and Description |
---|---|
static CachingWrapperFilter.DeletesMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CachingWrapperFilter.DeletesMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CachingWrapperFilter.DeletesMode IGNORE
public static final CachingWrapperFilter.DeletesMode RECACHE
public static final CachingWrapperFilter.DeletesMode DYNAMIC
public static CachingWrapperFilter.DeletesMode[] values()
for (CachingWrapperFilter.DeletesMode c : CachingWrapperFilter.DeletesMode.values()) System.out.println(c);
public static CachingWrapperFilter.DeletesMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is null