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.
|
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. | |
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.
|
protected |
Create a cached field source for the input field.
Definition at line 55 of file FieldCacheSource.cs.
|
pure virtual |
Check if equals to another FieldCacheSource, already knowing that cache and field are equal.
Implemented in Lucene.Net.Search.Function.ByteFieldSource, Lucene.Net.Search.Function.IntFieldSource, Lucene.Net.Search.Function.ShortFieldSource, and Lucene.Net.Search.Function.FloatFieldSource.
|
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).
Implemented in Lucene.Net.Search.Function.ByteFieldSource, Lucene.Net.Search.Function.IntFieldSource, Lucene.Net.Search.Function.ShortFieldSource, and Lucene.Net.Search.Function.FloatFieldSource.
|
virtual |
description of field, used in explain()
Implements Lucene.Net.Search.Function.ValueSource.
Reimplemented in Lucene.Net.Search.Function.IntFieldSource, Lucene.Net.Search.Function.ShortFieldSource, and Lucene.Net.Search.Function.FloatFieldSource.
Definition at line 67 of file FieldCacheSource.cs.
|
virtual |
Needed for possible caching of query results - used by ValueSourceQuery.Equals(Object).
Implements Lucene.Net.Search.Function.ValueSource.
Definition at line 82 of file FieldCacheSource.cs.
|
pure virtual |
Return cached DocValues for input field and reader.
cache | FieldCache so that values of a field are loaded once per reader (RAM allowing) |
field | Field for which values are required. |
Implemented in Lucene.Net.Search.Function.ByteFieldSource, Lucene.Net.Search.Function.IntFieldSource, Lucene.Net.Search.Function.ShortFieldSource, and Lucene.Net.Search.Function.FloatFieldSource.
|
virtual |
Needed for possible caching of query results - used by ValueSourceQuery.GetHashCode().
Implements Lucene.Net.Search.Function.ValueSource.
Definition at line 93 of file FieldCacheSource.cs.
|
virtual |
Return the DocValues used by the function query.
reader | the 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.