Provides methods for sanity checking that entries in the FieldCache
are not wasteful or inconsistent.
Lucene 2.9 Introduced numerous enhancements into how the FieldCache
is used by the low levels of Lucene searching (for Sorting and
ValueSourceQueries) to improve both the speed for Sorting, as well
as reopening of IndexReaders. But these changes have shifted the
usage of FieldCache from "top level" IndexReaders (frequently a
MultiReader or DirectoryReader) down to the leaf level SegmentReaders.
As a result, existing applications that directly access the FieldCache
may find RAM usage increase significantly when upgrading to 2.9 or
Later. This class provides an API for these applications (or their
Unit tests) to check at run time if the FieldCache contains "insane"
usages of the FieldCache.
EXPERIMENTAL API: This API is considered extremely advanced and
experimental. It may be removed or altered w/o warning in future releases
of Lucene.
The FieldCacheSanityChecker..::..InsanityType type exposes the following members.
Methods
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | (Overrides Object..::..ToString()()()().) |
Fields
Name | Description | |
---|---|---|
EXPECTED | Indicates an expected bit of "insanity". This may be useful for
clients that wish to preserve/log information about insane usage
but indicate that it was expected.
| |
SUBREADER | Indicates an overlap in cache usage on a given field
in sub/super readers.
| |
VALUEMISMATCH |
Indicates entries have the same reader+fieldname but
different cached values. This can happen if different datatypes,
or parsers are used -- and while it's not necessarily a bug
it's typically an indication of a possible problem.
PNOTE: Only the reader, fieldname, and cached value are actually
tested -- if two cache entries have different parsers or datatypes but
the cached values are the same Object (== not just equal()) this method
does not consider that a red flag. This allows for subtle variations
in the way a Parser is specified (null vs DEFAULT_LONG_PARSER, etc...)
|