Lucene.Net
3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
|
Expert: The default cache implementation, storing all values in memory. A WeakDictionary is used for storage. More...
Inherits Lucene.Net.Search.FieldCache.
Classes | |
class | ByteCache |
class | Cache |
Expert: Internal cache. | |
class | DoubleCache |
class | Entry |
Expert: Every composite-key in the internal cache is of this type. | |
class | FloatCache |
class | IntCache |
class | LongCache |
class | ShortCache |
class | StopFillCacheException |
Hack: When thrown from a Parser (NUMERIC_UTILS_* ones), this stops processing terms and returns the current FieldCache array. | |
class | StringCache |
class | StringIndexCache |
Public Member Functions | |
virtual void | PurgeAllCaches () |
EXPERT: Instructs the FieldCache to forcibly expunge all entries from the underlying caches. This is intended only to be used for test methods as a way to ensure a known base state of the Cache (with out needing to rely on GC to free WeakReferences). It should not be relied on for "Cache maintenance" in general application code. EXPERIMENTAL API: This API is considered extremely advanced and experimental. It may be removed or altered w/o warning in future releases of Lucene. | |
void | Purge (IndexReader r) |
Expert: drops all cache entries associated with this reader. NOTE: this reader must precisely match the reader that the cache entry is keyed on. If you pass a top-level reader, it usually will have no effect as Lucene now caches at the segment reader level. | |
virtual CacheEntry[] | GetCacheEntries () |
EXPERT: Generates an array of CacheEntry objects representing all items currently in the FieldCache. NOTE: These CacheEntry objects maintain a strong refrence to the Cached Values. Maintaining refrences to a CacheEntry the IndexReader associated with it has garbage collected will prevent the Value itself from being garbage collected when the Cache drops the WeakRefrence. EXPERIMENTAL API: This API is considered extremely advanced and experimental. It may be removed or altered w/o warning in future releases of Lucene. | |
virtual sbyte[] | GetBytes (IndexReader reader, System.String field) |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as a single byte and returns an array of size reader.MaxDoc of the value each document has in the given field. | |
virtual sbyte[] | GetBytes (IndexReader reader, System.String field, ByteParser parser) |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as bytes and returns an array of size reader.MaxDoc of the value each document has in the given field. | |
virtual short[] | GetShorts (IndexReader reader, System.String field) |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.MaxDoc of the value each document has in the given field. | |
virtual short[] | GetShorts (IndexReader reader, System.String field, ShortParser parser) |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.MaxDoc of the value each document has in the given field. | |
virtual int[] | GetInts (IndexReader reader, System.String field) |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.MaxDoc of the value each document has in the given field. | |
virtual int[] | GetInts (IndexReader reader, System.String field, IntParser parser) |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.MaxDoc of the value each document has in the given field. | |
virtual float[] | GetFloats (IndexReader reader, System.String field) |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.MaxDoc of the value each document has in the given field. | |
virtual float[] | GetFloats (IndexReader reader, System.String field, FloatParser parser) |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.MaxDoc of the value each document has in the given field. | |
virtual long[] | GetLongs (IndexReader reader, System.String field) |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.MaxDoc of the value each document has in the given field. | |
virtual long[] | GetLongs (IndexReader reader, System.String field, Lucene.Net.Search.LongParser parser) |
virtual double[] | GetDoubles (IndexReader reader, System.String field) |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.MaxDoc of the value each document has in the given field. | |
virtual double[] | GetDoubles (IndexReader reader, System.String field, Lucene.Net.Search.DoubleParser parser) |
virtual System.String[] | GetStrings (IndexReader reader, System.String field) |
Checks the internal cache for an appropriate entry, and if none is found, reads the term values in field and returns an array of size reader.MaxDoc containing the value each document has in the given field. | |
virtual StringIndex | GetStringIndex (IndexReader reader, System.String field) |
Checks the internal cache for an appropriate entry, and if none is found reads the term values in field and returns an array of them in natural order, along with an array telling which element in the term array each document uses. | |
Public Member Functions inherited from Lucene.Net.Search.FieldCache | |
long[] | GetLongs (IndexReader reader, System.String field, LongParser parser) |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.MaxDoc of the value each document has in the given field. | |
double[] | GetDoubles (IndexReader reader, System.String field, DoubleParser parser) |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as doubles and returns an array of size reader.MaxDoc of the value each document has in the given field. | |
Properties | |
virtual StreamWriter | InfoStream [get, set] |
Properties inherited from Lucene.Net.Search.FieldCache | |
StreamWriter | InfoStream [get, set] |
Gets or sets the InfoStream for this FieldCache. | |
Expert: The default cache implementation, storing all values in memory. A WeakDictionary is used for storage.
Created: May 19, 2004 4:40:36 PM
<since> lucene 1.4 </since>
Definition at line 43 of file FieldCacheImpl.cs.
|
virtual |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field
as a single byte and returns an array of size reader.MaxDoc
of the value each document has in the given field.
reader | Used to get field values. |
field | Which field contains the single byte values. |
<throws> IOException If any error occurs. </throws>
Implements Lucene.Net.Search.FieldCache.
Definition at line 327 of file FieldCacheImpl.cs.
|
virtual |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field
as bytes and returns an array of size reader.MaxDoc
of the value each document has in the given field.
reader | Used to get field values. |
field | Which field contains the bytes. |
parser | Computes byte for string values. |
<throws> IOException If any error occurs. </throws>
Implements Lucene.Net.Search.FieldCache.
Definition at line 333 of file FieldCacheImpl.cs.
|
virtual |
EXPERT: Generates an array of CacheEntry objects representing all items currently in the FieldCache. NOTE: These CacheEntry objects maintain a strong refrence to the Cached Values. Maintaining refrences to a CacheEntry the IndexReader associated with it has garbage collected will prevent the Value itself from being garbage collected when the Cache drops the WeakRefrence. EXPERIMENTAL API: This API is considered extremely advanced and experimental. It may be removed or altered w/o warning in future releases of Lucene.
Implements Lucene.Net.Search.FieldCache.
Definition at line 95 of file FieldCacheImpl.cs.
|
virtual |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field
as integers and returns an array of size reader.MaxDoc
of the value each document has in the given field.
reader | Used to get field values. |
field | Which field contains the doubles. |
<throws> IOException If any error occurs. </throws>
Implements Lucene.Net.Search.FieldCache.
Definition at line 662 of file FieldCacheImpl.cs.
|
virtual |
Definition at line 668 of file FieldCacheImpl.cs.
|
virtual |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field
as floats and returns an array of size reader.MaxDoc
of the value each document has in the given field.
reader | Used to get field values. |
field | Which field contains the floats. |
<throws> IOException If any error occurs. </throws>
Implements Lucene.Net.Search.FieldCache.
Definition at line 517 of file FieldCacheImpl.cs.
|
virtual |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field
as floats and returns an array of size reader.MaxDoc
of the value each document has in the given field.
reader | Used to get field values. |
field | Which field contains the floats. |
parser | Computes float for string values. |
<throws> IOException If any error occurs. </throws>
Implements Lucene.Net.Search.FieldCache.
Definition at line 523 of file FieldCacheImpl.cs.
|
virtual |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field
as integers and returns an array of size reader.MaxDoc
of the value each document has in the given field.
reader | Used to get field values. |
field | Which field contains the integers. |
<throws> IOException If any error occurs. </throws>
Implements Lucene.Net.Search.FieldCache.
Definition at line 444 of file FieldCacheImpl.cs.
|
virtual |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field
as integers and returns an array of size reader.MaxDoc
of the value each document has in the given field.
reader | Used to get field values. |
field | Which field contains the integers. |
parser | Computes integer for string values. |
<throws> IOException If any error occurs. </throws>
Implements Lucene.Net.Search.FieldCache.
Definition at line 450 of file FieldCacheImpl.cs.
|
virtual |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field
as longs and returns an array of size reader.MaxDoc
of the value each document has in the given field.
reader | Used to get field values. |
field | Which field contains the longs. |
<throws> java.io.IOException If any error occurs. </throws>
Implements Lucene.Net.Search.FieldCache.
Definition at line 590 of file FieldCacheImpl.cs.
|
virtual |
Definition at line 596 of file FieldCacheImpl.cs.
|
virtual |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field
as shorts and returns an array of size reader.MaxDoc
of the value each document has in the given field.
reader | Used to get field values. |
field | Which field contains the shorts. |
<throws> IOException If any error occurs. </throws>
Implements Lucene.Net.Search.FieldCache.
Definition at line 385 of file FieldCacheImpl.cs.
|
virtual |
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field
as shorts and returns an array of size reader.MaxDoc
of the value each document has in the given field.
reader | Used to get field values. |
field | Which field contains the shorts. |
parser | Computes short for string values. |
<throws> IOException If any error occurs. </throws>
Implements Lucene.Net.Search.FieldCache.
Definition at line 391 of file FieldCacheImpl.cs.
|
virtual |
Checks the internal cache for an appropriate entry, and if none is found reads the term values in field
and returns an array of them in natural order, along with an array telling which element in the term array each document uses.
reader | Used to get field values. |
field | Which field contains the strings. |
<throws> IOException If any error occurs. </throws>
Implements Lucene.Net.Search.FieldCache.
Definition at line 778 of file FieldCacheImpl.cs.
|
virtual |
Checks the internal cache for an appropriate entry, and if none is found, reads the term values in field
and returns an array of size reader.MaxDoc
containing the value each document has in the given field.
reader | Used to get field values. |
field | Which field contains the strings. |
<throws> IOException If any error occurs. </throws>
Implements Lucene.Net.Search.FieldCache.
Definition at line 734 of file FieldCacheImpl.cs.
void Lucene.Net.Search.FieldCacheImpl.Purge | ( | IndexReader | r | ) |
Expert: drops all cache entries associated with this reader. NOTE: this reader must precisely match the reader that the cache entry is keyed on. If you pass a top-level reader, it usually will have no effect as Lucene now caches at the segment reader level.
Implements Lucene.Net.Search.FieldCache.
Definition at line 81 of file FieldCacheImpl.cs.
|
virtual |
EXPERT: Instructs the FieldCache to forcibly expunge all entries from the underlying caches. This is intended only to be used for test methods as a way to ensure a known base state of the Cache (with out needing to rely on GC to free WeakReferences). It should not be relied on for "Cache maintenance" in general application code. EXPERIMENTAL API: This API is considered extremely advanced and experimental. It may be removed or altered w/o warning in future releases of Lucene.
Implements Lucene.Net.Search.FieldCache.
Definition at line 70 of file FieldCacheImpl.cs.
|
getset |
Definition at line 853 of file FieldCacheImpl.cs.