Interface IFieldCache
Expert: Maintains caches of term values.
Created: May 19, 2004 11:13:14 AM
@lucene.internal
@since lucene 1.4
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.dll
Syntax
public interface IFieldCache
Properties
| Improve this Doc View SourceInfoStream
If non-null, Lucene.
Declaration
TextWriter InfoStream { get; set; }
Property Value
Type | Description |
---|---|
Text |
Methods
| Improve this Doc View SourceGetBytes(AtomicReader, String, FieldCache.IByteParser, Boolean)
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.
Declaration
FieldCache.Bytes GetBytes(AtomicReader reader, string field, FieldCache.IByteParser parser, bool setDocsWithField)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
reader | Used to get field values. |
System. |
field | Which field contains the |
Field |
parser | Computes |
System. |
setDocsWithField | If true then Get |
Returns
Type | Description |
---|---|
Field |
The values in the given field for each document. |
GetBytes(AtomicReader, String, Boolean)
Checks the internal cache for an appropriate entry, and if none is
found, reads the terms in field
as a single reader.MaxDoc
of the value each document
has in the given field.
Declaration
FieldCache.Bytes GetBytes(AtomicReader reader, string field, bool setDocsWithField)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
reader | Used to get field values. |
System. |
field | Which field contains the single |
System. |
setDocsWithField | If true then Get |
Returns
Type | Description |
---|---|
Field |
The values in the given field for each document. |
GetCacheEntries()
EXPERT: Generates an array of Field
NOTE: These Field
Declaration
FieldCache.CacheEntry[] GetCacheEntries()
Returns
Type | Description |
---|---|
Field |
GetDocsWithField(AtomicReader, String)
Checks the internal cache for an appropriate entry, and if none is found,
reads the terms in field
and returns a bit set at the size of
reader.MaxDoc
, with turned on bits for each docid that
does have a value for this field.
Declaration
IBits GetDocsWithField(AtomicReader reader, string field)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
reader | |
System. |
field |
Returns
Type | Description |
---|---|
IBits |
GetDocTermOrds(AtomicReader, String)
Checks the internal cache for an appropriate entry, and if none is found, reads the term values
in field
and returns a Sorted
Declaration
SortedSetDocValues GetDocTermOrds(AtomicReader reader, string field)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
reader | Used to build a Sorted |
System. |
field | Which field contains the strings. |
Returns
Type | Description |
---|---|
Sorted |
a Sorted |
GetDoubles(AtomicReader, String, FieldCache.IDoubleParser, Boolean)
Returns a Fieldfield
as reader.MaxDoc
of the value each document
has in the given field.
Declaration
FieldCache.Doubles GetDoubles(AtomicReader reader, string field, FieldCache.IDoubleParser parser, bool setDocsWithField)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
reader | Used to get field values. |
System. |
field | Which field contains the |
Field |
parser | Computes |
System. |
setDocsWithField | If true then Get |
Returns
Type | Description |
---|---|
Field |
The values in the given field for each document. |
GetDoubles(AtomicReader, String, Boolean)
Returns a Field
Declaration
FieldCache.Doubles GetDoubles(AtomicReader reader, string field, bool setDocsWithField)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
reader | |
System. |
field | |
System. |
setDocsWithField |
Returns
Type | Description |
---|---|
Field |
See Also
| Improve this Doc View SourceGetInt16s(AtomicReader, String, FieldCache.IInt16Parser, Boolean)
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.
NOTE: this was getShorts() in Lucene
Declaration
FieldCache.Int16s GetInt16s(AtomicReader reader, string field, FieldCache.IInt16Parser parser, bool setDocsWithField)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
reader | Used to get field values. |
System. |
field | Which field contains the |
Field |
parser | Computes |
System. |
setDocsWithField | If true then Get |
Returns
Type | Description |
---|---|
Field |
The values in the given field for each document. |
GetInt16s(AtomicReader, String, Boolean)
Checks the internal cache for an appropriate entry, and if none is
found, reads the terms in field
as reader.MaxDoc
of the value each document
has in the given field.
NOTE: this was getShorts() in Lucene
Declaration
FieldCache.Int16s GetInt16s(AtomicReader reader, string field, bool setDocsWithField)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
reader | Used to get field values. |
System. |
field | Which field contains the |
System. |
setDocsWithField | If true then Get |
Returns
Type | Description |
---|---|
Field |
The values in the given field for each document. |
GetInt32s(AtomicReader, String, FieldCache.IInt32Parser, Boolean)
Returns an Fieldfield
as reader.MaxDoc
of the value each document
has in the given field.
NOTE: this was getInts() in Lucene
Declaration
FieldCache.Int32s GetInt32s(AtomicReader reader, string field, FieldCache.IInt32Parser parser, bool setDocsWithField)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
reader | Used to get field values. |
System. |
field | Which field contains the |
Field |
parser | Computes |
System. |
setDocsWithField | If true then Get |
Returns
Type | Description |
---|---|
Field |
The values in the given field for each document. |
GetInt32s(AtomicReader, String, Boolean)
Returns an Field
NOTE: this was getInts() in Lucene
Declaration
FieldCache.Int32s GetInt32s(AtomicReader reader, string field, bool setDocsWithField)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
reader | |
System. |
field | |
System. |
setDocsWithField |
Returns
Type | Description |
---|---|
Field |
See Also
| Improve this Doc View SourceGetInt64s(AtomicReader, String, FieldCache.IInt64Parser, Boolean)
Returns a Fieldfield
as reader.MaxDoc
of the value each document
has in the given field.
NOTE: this was getLongs() in Lucene
Declaration
FieldCache.Int64s GetInt64s(AtomicReader reader, string field, FieldCache.IInt64Parser parser, bool setDocsWithField)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
reader | Used to get field values. |
System. |
field | Which field contains the |
Field |
parser | Computes |
System. |
setDocsWithField | If true then Get |
Returns
Type | Description |
---|---|
Field |
The values in the given field for each document. |
GetInt64s(AtomicReader, String, Boolean)
Returns a Field
NOTE: this was getLongs() in Lucene
Declaration
FieldCache.Int64s GetInt64s(AtomicReader reader, string field, bool setDocsWithField)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
reader | |
System. |
field | |
System. |
setDocsWithField |
Returns
Type | Description |
---|---|
Field |
See Also
| Improve this Doc View SourceGetSingles(AtomicReader, String, FieldCache.ISingleParser, Boolean)
Returns a Fieldfield
as reader.MaxDoc
of the value each document
has in the given field.
NOTE: this was getFloats() in Lucene
Declaration
FieldCache.Singles GetSingles(AtomicReader reader, string field, FieldCache.ISingleParser parser, bool setDocsWithField)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
reader | Used to get field values. |
System. |
field | Which field contains the |
Field |
parser | Computes |
System. |
setDocsWithField | If true then Get |
Returns
Type | Description |
---|---|
Field |
The values in the given field for each document. |
GetSingles(AtomicReader, String, Boolean)
Returns a Field
NOTE: this was getFloats() in Lucene
Declaration
FieldCache.Singles GetSingles(AtomicReader reader, string field, bool setDocsWithField)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
reader | |
System. |
field | |
System. |
setDocsWithField |
Returns
Type | Description |
---|---|
Field |
See Also
| Improve this Doc View SourceGetTerms(AtomicReader, String, Boolean)
Checks the internal cache for an appropriate entry, and if none
is found, reads the term values in field
and returns a Binary
Declaration
BinaryDocValues GetTerms(AtomicReader reader, string field, bool setDocsWithField)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
reader | Used to get field values. |
System. |
field | Which field contains the strings. |
System. |
setDocsWithField | If true then Get |
Returns
Type | Description |
---|---|
Binary |
The values in the given field for each document. |
GetTerms(AtomicReader, String, Boolean, Single)
Expert: just like Get
Declaration
BinaryDocValues GetTerms(AtomicReader reader, string field, bool setDocsWithField, float acceptableOverheadRatio)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
reader | |
System. |
field | |
System. |
setDocsWithField | |
System. |
acceptableOverheadRatio |
Returns
Type | Description |
---|---|
Binary |
GetTermsIndex(AtomicReader, String)
Checks the internal cache for an appropriate entry, and if none
is found, reads the term values in field
and returns a Sorted
Declaration
SortedDocValues GetTermsIndex(AtomicReader reader, string field)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
reader | Used to get field values. |
System. |
field | Which field contains the strings. |
Returns
Type | Description |
---|---|
Sorted |
The values in the given field for each document. |
GetTermsIndex(AtomicReader, String, Single)
Expert: just like
Get
Declaration
SortedDocValues GetTermsIndex(AtomicReader reader, string field, float acceptableOverheadRatio)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
reader | |
System. |
field | |
System. |
acceptableOverheadRatio |
Returns
Type | Description |
---|---|
Sorted |
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
Declaration
void PurgeAllCaches()
PurgeByCacheKey(Object)
Expert: drops all cache entries associated with this
reader Core
Declaration
void PurgeByCacheKey(object coreCacheKey)
Parameters
Type | Name | Description |
---|---|---|
System. |
coreCacheKey |