Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class FieldCacheSanityChecker

    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.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Inheritance
    object
    FieldCacheSanityChecker
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class FieldCacheSanityChecker

    Constructors

    FieldCacheSanityChecker()

    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.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public FieldCacheSanityChecker()
    See Also
    IFieldCache
    FieldCacheSanityChecker.Insanity
    FieldCacheSanityChecker.InsanityType

    FieldCacheSanityChecker(bool)

    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.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public FieldCacheSanityChecker(bool estimateRam)
    Parameters
    Type Name Description
    bool estimateRam

    If set, estimate size for all FieldCache.CacheEntry objects will be calculated.

    See Also
    IFieldCache
    FieldCacheSanityChecker.Insanity
    FieldCacheSanityChecker.InsanityType

    Methods

    Check(params CacheEntry[])

    Tests a CacheEntry[] for indication of "insane" cache usage.

    NOTE:FieldCache CreationPlaceholder objects are ignored. (:TODO: is this a bad idea? are we masking a real problem?)

    Declaration
    public FieldCacheSanityChecker.Insanity[] Check(params FieldCache.CacheEntry[] cacheEntries)
    Parameters
    Type Name Description
    CacheEntry[] cacheEntries
    Returns
    Type Description
    Insanity[]
    See Also
    IFieldCache
    FieldCacheSanityChecker.Insanity
    FieldCacheSanityChecker.InsanityType

    CheckSanity(params CacheEntry[])

    Quick and dirty convenience method that instantiates an instance with "good defaults" and uses it to test the FieldCache.CacheEntrys

    Declaration
    public static FieldCacheSanityChecker.Insanity[] CheckSanity(params FieldCache.CacheEntry[] cacheEntries)
    Parameters
    Type Name Description
    CacheEntry[] cacheEntries
    Returns
    Type Description
    Insanity[]
    See Also
    Check(params CacheEntry[])

    CheckSanity(IFieldCache)

    Quick and dirty convenience method

    Declaration
    public static FieldCacheSanityChecker.Insanity[] CheckSanity(IFieldCache cache)
    Parameters
    Type Name Description
    IFieldCache cache
    Returns
    Type Description
    Insanity[]
    See Also
    Check(params CacheEntry[])

    See Also

    IFieldCache
    FieldCacheSanityChecker.Insanity
    FieldCacheSanityChecker.InsanityType
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.