Lucene.Net  3.0.3
Lucene.Net is a port of the Lucene search engine library, written in C# and targeted at .NET runtime users.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
Classes | Public Member Functions | Static Public Member Functions | List of all members
Lucene.Net.Util.FieldCacheSanityChecker Class Reference

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. More...

Classes

class  Insanity
 Simple container for a collection of related CacheEntry objects that in conjunction with eachother represent some "insane" usage of the FieldCache. More...
 
class  InsanityType
 An Enumaration of the differnet types of "insane" behavior that may be detected in a FieldCache. More...
 

Public Member Functions

 FieldCacheSanityChecker ()
 
void SetRamUsageEstimator (RamUsageEstimator r)
 If set, will be used to estimate size for all CacheEntry objects dealt with.
 
Insanity[] Check (params CacheEntry[] cacheEntries)
 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?)
 

Static Public Member Functions

static Insanity[] CheckSanity (FieldCache cache)
 Quick and dirty convenience method
 
static Insanity[] CheckSanity (params CacheEntry[] cacheEntries)
 Quick and dirty convenience method that instantiates an instance with "good defaults" and uses it to test the CacheEntrys
 

Detailed Description

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.

See Also
FieldCache
See Also
FieldCacheSanityChecker.Insanity
See Also
FieldCacheSanityChecker.InsanityType

Definition at line 56 of file FieldCacheSanityChecker.cs.

Constructor & Destructor Documentation

Lucene.Net.Util.FieldCacheSanityChecker.FieldCacheSanityChecker ( )

Definition at line 60 of file FieldCacheSanityChecker.cs.

Member Function Documentation

Insanity [] Lucene.Net.Util.FieldCacheSanityChecker.Check ( params CacheEntry[]  cacheEntries)

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?)

Definition at line 101 of file FieldCacheSanityChecker.cs.

static Insanity [] Lucene.Net.Util.FieldCacheSanityChecker.CheckSanity ( FieldCache  cache)
static

Quick and dirty convenience method

See Also
Check

Definition at line 76 of file FieldCacheSanityChecker.cs.

static Insanity [] Lucene.Net.Util.FieldCacheSanityChecker.CheckSanity ( params CacheEntry[]  cacheEntries)
static

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

See Also
Check

Definition at line 86 of file FieldCacheSanityChecker.cs.

void Lucene.Net.Util.FieldCacheSanityChecker.SetRamUsageEstimator ( RamUsageEstimator  r)

If set, will be used to estimate size for all CacheEntry objects dealt with.

Definition at line 67 of file FieldCacheSanityChecker.cs.


The documentation for this class was generated from the following file: