org.apache.lucene.util

## Class FieldCacheSanityChecker.InsanityType

- java.lang.Object
- - org.apache.lucene.util.FieldCacheSanityChecker.InsanityType

- Enclosing class:
    FieldCacheSanityChecker

      public static final class FieldCacheSanityChecker.InsanityType
      extends Object

  An Enumeration of the different types of "insane" behavior that may be detected in a FieldCache.
  See Also:
    `SUBREADER`, `VALUEMISMATCH`, `EXPECTED`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static FieldCacheSanityChecker.InsanityType` | `EXPECTED` Indicates an expected bit of "insanity".
    `static FieldCacheSanityChecker.InsanityType` | `SUBREADER` Indicates an overlap in cache usage on a given field in sub/super readers.
    `static FieldCacheSanityChecker.InsanityType` | `VALUEMISMATCH` Indicates entries have the same reader+fieldname but different cached values.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### SUBREADER

          public static final FieldCacheSanityChecker.InsanityType SUBREADER

      Indicates an overlap in cache usage on a given field in sub/super readers.

    - #### VALUEMISMATCH

          public static final FieldCacheSanityChecker.InsanityType 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.

      NOTE: 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...)

    - #### EXPECTED

          public static final FieldCacheSanityChecker.InsanityType 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.

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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