Lucene.Net  3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties
Public Member Functions | Properties | List of all members
Lucene.Net.Search.FieldCache Interface Reference

Inherited by Lucene.Net.Search.FieldCacheImpl.

Public Member Functions

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

Properties

StreamWriter InfoStream [get, set]
 Gets or sets the InfoStream for this FieldCache.
 

Detailed Description

Definition at line 376 of file FieldCache.cs.

Member Function Documentation

sbyte [] Lucene.Net.Search.FieldCache.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.

Parameters
readerUsed to get field values.
fieldWhich field contains the single byte values.
Returns
The values in the given field for each document.

<throws> IOException If any error occurs. </throws>

Implemented in Lucene.Net.Search.FieldCacheImpl.

sbyte [] Lucene.Net.Search.FieldCache.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.

Parameters
readerUsed to get field values.
fieldWhich field contains the bytes.
parserComputes byte for string values.
Returns
The values in the given field for each document.

<throws> IOException If any error occurs. </throws>

Implemented in Lucene.Net.Search.FieldCacheImpl.

CacheEntry [] Lucene.Net.Search.FieldCache.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.

Implemented in Lucene.Net.Search.FieldCacheImpl.

double [] Lucene.Net.Search.FieldCache.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.

Parameters
readerUsed to get field values.
fieldWhich field contains the doubles.
Returns
The values in the given field for each document.

<throws> IOException If any error occurs. </throws>

Implemented in Lucene.Net.Search.FieldCacheImpl.

double [] Lucene.Net.Search.FieldCache.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.

Parameters
readerUsed to get field values.
fieldWhich field contains the doubles.
parserComputes integer for string values.
Returns
The values in the given field for each document.

<throws> IOException If any error occurs. </throws>

float [] Lucene.Net.Search.FieldCache.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.

Parameters
readerUsed to get field values.
fieldWhich field contains the floats.
Returns
The values in the given field for each document.

<throws> IOException If any error occurs. </throws>

Implemented in Lucene.Net.Search.FieldCacheImpl.

float [] Lucene.Net.Search.FieldCache.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.

Parameters
readerUsed to get field values.
fieldWhich field contains the floats.
parserComputes float for string values.
Returns
The values in the given field for each document.

<throws> IOException If any error occurs. </throws>

Implemented in Lucene.Net.Search.FieldCacheImpl.

int [] Lucene.Net.Search.FieldCache.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.

Parameters
readerUsed to get field values.
fieldWhich field contains the integers.
Returns
The values in the given field for each document.

<throws> IOException If any error occurs. </throws>

Implemented in Lucene.Net.Search.FieldCacheImpl.

int [] Lucene.Net.Search.FieldCache.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.

Parameters
readerUsed to get field values.
fieldWhich field contains the integers.
parserComputes integer for string values.
Returns
The values in the given field for each document.

<throws> IOException If any error occurs. </throws>

Implemented in Lucene.Net.Search.FieldCacheImpl.

long [] Lucene.Net.Search.FieldCache.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.

Parameters
readerUsed to get field values.
fieldWhich field contains the longs.
Returns
The values in the given field for each document.

<throws> java.io.IOException If any error occurs. </throws>

Implemented in Lucene.Net.Search.FieldCacheImpl.

long [] Lucene.Net.Search.FieldCache.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.

Parameters
readerUsed to get field values.
fieldWhich field contains the longs.
parserComputes integer for string values.
Returns
The values in the given field for each document.

<throws> IOException If any error occurs. </throws>

short [] Lucene.Net.Search.FieldCache.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.

Parameters
readerUsed to get field values.
fieldWhich field contains the shorts.
Returns
The values in the given field for each document.

<throws> IOException If any error occurs. </throws>

Implemented in Lucene.Net.Search.FieldCacheImpl.

short [] Lucene.Net.Search.FieldCache.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.

Parameters
readerUsed to get field values.
fieldWhich field contains the shorts.
parserComputes short for string values.
Returns
The values in the given field for each document.

<throws> IOException If any error occurs. </throws>

Implemented in Lucene.Net.Search.FieldCacheImpl.

StringIndex Lucene.Net.Search.FieldCache.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.

Parameters
readerUsed to get field values.
fieldWhich field contains the strings.
Returns
Array of terms and index into the array for each document.

<throws> IOException If any error occurs. </throws>

Implemented in Lucene.Net.Search.FieldCacheImpl.

System.String [] Lucene.Net.Search.FieldCache.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.

Parameters
readerUsed to get field values.
fieldWhich field contains the strings.
Returns
The values in the given field for each document.

<throws> IOException If any error occurs. </throws>

Implemented in Lucene.Net.Search.FieldCacheImpl.

void Lucene.Net.Search.FieldCache.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.

Implemented in Lucene.Net.Search.FieldCacheImpl.

void Lucene.Net.Search.FieldCache.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.

Implemented in Lucene.Net.Search.FieldCacheImpl.

Property Documentation

StreamWriter Lucene.Net.Search.FieldCache.InfoStream
getset

Gets or sets the InfoStream for this FieldCache.

If non-null, FieldCacheImpl will warn whenever entries are created that are not sane according to Lucene.Net.Util.FieldCacheSanityChecker.

Definition at line 641 of file FieldCache.cs.


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