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
Public Member Functions | Protected Member Functions | List of all members
Lucene.Net.Search.Function.FieldCacheSource Class Referenceabstract

Expert: A base class for ValueSource implementations that retrieve values for a single field from the FieldCache. Fields used herein nust be indexed (doesn't matter if these fields are stored or not). It is assumed that each such indexed field is untokenized, or at least has a single token in a document. For documents with multiple tokens of the same field, behavior is undefined (It is likely that current code would use the value of one of these tokens, but this is not guaranteed). Document with no tokens in this field are assigned the Zero value. More...

Inherits Lucene.Net.Search.Function.ValueSource.

Inherited by Lucene.Net.Search.Function.ByteFieldSource, Lucene.Net.Search.Function.FloatFieldSource, Lucene.Net.Search.Function.IntFieldSource, and Lucene.Net.Search.Function.ShortFieldSource.

Public Member Functions

override DocValues GetValues (IndexReader reader)
 Return the DocValues used by the function query.
 
override System.String Description ()
 description of field, used in explain()
 
abstract DocValues GetCachedFieldValues (FieldCache cache, System.String field, IndexReader reader)
 Return cached DocValues for input field and reader.
 
override bool Equals (System.Object o)
 Needed for possible caching of query results - used by ValueSourceQuery.Equals(Object).
 
override int GetHashCode ()
 Needed for possible caching of query results - used by ValueSourceQuery.GetHashCode().
 
abstract bool CachedFieldSourceEquals (FieldCacheSource other)
 Check if equals to another FieldCacheSource, already knowing that cache and field are equal.
 
abstract int CachedFieldSourceHashCode ()
 Return a hash code of a FieldCacheSource, without the hash-codes of the field and the cache (those are taken care of elsewhere).
 
- Public Member Functions inherited from Lucene.Net.Search.Function.ValueSource
override System.String ToString ()
 

Protected Member Functions

 FieldCacheSource (System.String field)
 Create a cached field source for the input field.
 

Detailed Description

Expert: A base class for ValueSource implementations that retrieve values for a single field from the FieldCache.

Fields used herein nust be indexed (doesn't matter if these fields are stored or not).

It is assumed that each such indexed field is untokenized, or at least has a single token in a document. For documents with multiple tokens of the same field, behavior is undefined (It is likely that current code would use the value of one of these tokens, but this is not guaranteed).

Document with no tokens in this field are assigned the Zero value.

<font color="#FF0000"> WARNING: The status of the Search.Function package is experimental. The APIs introduced here might change in the future and will not be supported anymore in such a case.</font>

NOTE: with the switch in 2.9 to segment-based searching, if GetValues is invoked with a composite (multi-segment) reader, this can easily cause double RAM usage for the values in the FieldCache. It's best to switch your application to pass only atomic (single segment) readers to this API.

Definition at line 50 of file FieldCacheSource.cs.

Constructor & Destructor Documentation

Lucene.Net.Search.Function.FieldCacheSource.FieldCacheSource ( System.String  field)
protected

Create a cached field source for the input field.

Definition at line 55 of file FieldCacheSource.cs.

Member Function Documentation

abstract bool Lucene.Net.Search.Function.FieldCacheSource.CachedFieldSourceEquals ( FieldCacheSource  other)
pure virtual

Check if equals to another FieldCacheSource, already knowing that cache and field are equal.

See Also
Object.Equals(Object)

Implemented in Lucene.Net.Search.Function.ByteFieldSource, Lucene.Net.Search.Function.IntFieldSource, Lucene.Net.Search.Function.ShortFieldSource, and Lucene.Net.Search.Function.FloatFieldSource.

abstract int Lucene.Net.Search.Function.FieldCacheSource.CachedFieldSourceHashCode ( )
pure virtual

Return a hash code of a FieldCacheSource, without the hash-codes of the field and the cache (those are taken care of elsewhere).

See Also
Object.GetHashCode()

Implemented in Lucene.Net.Search.Function.ByteFieldSource, Lucene.Net.Search.Function.IntFieldSource, Lucene.Net.Search.Function.ShortFieldSource, and Lucene.Net.Search.Function.FloatFieldSource.

override System.String Lucene.Net.Search.Function.FieldCacheSource.Description ( )
virtual
override bool Lucene.Net.Search.Function.FieldCacheSource.Equals ( System.Object  o)
virtual

Needed for possible caching of query results - used by ValueSourceQuery.Equals(Object).

See Also
Object.Equals(Object)

Implements Lucene.Net.Search.Function.ValueSource.

Definition at line 82 of file FieldCacheSource.cs.

abstract DocValues Lucene.Net.Search.Function.FieldCacheSource.GetCachedFieldValues ( FieldCache  cache,
System.String  field,
IndexReader  reader 
)
pure virtual

Return cached DocValues for input field and reader.

Parameters
cacheFieldCache so that values of a field are loaded once per reader (RAM allowing)
fieldField for which values are required.
See Also
ValueSource

Implemented in Lucene.Net.Search.Function.ByteFieldSource, Lucene.Net.Search.Function.IntFieldSource, Lucene.Net.Search.Function.ShortFieldSource, and Lucene.Net.Search.Function.FloatFieldSource.

override int Lucene.Net.Search.Function.FieldCacheSource.GetHashCode ( )
virtual

Needed for possible caching of query results - used by ValueSourceQuery.GetHashCode().

See Also
Object.GetHashCode()

Implements Lucene.Net.Search.Function.ValueSource.

Definition at line 93 of file FieldCacheSource.cs.

override DocValues Lucene.Net.Search.Function.FieldCacheSource.GetValues ( IndexReader  reader)
virtual

Return the DocValues used by the function query.

Parameters
readerthe IndexReader used to read these values. If any caching is involved, that caching would also be IndexReader based.

<throws> IOException for any error. </throws>

Implements Lucene.Net.Search.Function.ValueSource.

Definition at line 61 of file FieldCacheSource.cs.


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