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
Classes | Public Member Functions | List of all members
Lucene.Net.Search.Function.ShortFieldSource Class Reference

Expert: obtains short field values from the FieldCache using getShorts() and makes those values available as other numeric types, casting as needed. More...

Inherits Lucene.Net.Search.Function.FieldCacheSource.

Public Member Functions

 ShortFieldSource (System.String field)
 Create a cached short field source with default string-to-short parser.
 
 ShortFieldSource (System.String field, Lucene.Net.Search.ShortParser parser)
 Create a cached short field source with a specific string-to-short parser.
 
override System.String Description ()
 description of field, used in explain()
 
override DocValues GetCachedFieldValues (FieldCache cache, System.String field, IndexReader reader)
 Return cached DocValues for input field and reader.
 
override bool CachedFieldSourceEquals (FieldCacheSource o)
 Check if equals to another FieldCacheSource, already knowing that cache and field are equal.
 
override 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.FieldCacheSource
override DocValues GetValues (IndexReader reader)
 Return the DocValues used by the function query.
 
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().
 
- Public Member Functions inherited from Lucene.Net.Search.Function.ValueSource
override System.String ToString ()
 

Additional Inherited Members

- Protected Member Functions inherited from Lucene.Net.Search.Function.FieldCacheSource
 FieldCacheSource (System.String field)
 Create a cached field source for the input field.
 

Detailed Description

Expert: obtains short field values from the FieldCache using getShorts() and makes those values available as other numeric types, casting as needed.

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

See Also
Lucene.Net.Search.Function.FieldCacheSource

for requirements on the field.

NOTE: with the switch in 2.9 to segment-based searching, if FieldCacheSource.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 48 of file ShortFieldSource.cs.

Constructor & Destructor Documentation

Lucene.Net.Search.Function.ShortFieldSource.ShortFieldSource ( System.String  field)

Create a cached short field source with default string-to-short parser.

Definition at line 96 of file ShortFieldSource.cs.

Lucene.Net.Search.Function.ShortFieldSource.ShortFieldSource ( System.String  field,
Lucene.Net.Search.ShortParser  parser 
)

Create a cached short field source with a specific string-to-short parser.

Definition at line 101 of file ShortFieldSource.cs.

Member Function Documentation

override bool Lucene.Net.Search.Function.ShortFieldSource.CachedFieldSourceEquals ( FieldCacheSource  other)
virtual

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

See Also
Object.Equals(Object)

Implements Lucene.Net.Search.Function.FieldCacheSource.

Definition at line 120 of file ShortFieldSource.cs.

override int Lucene.Net.Search.Function.ShortFieldSource.CachedFieldSourceHashCode ( )
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()

Implements Lucene.Net.Search.Function.FieldCacheSource.

Definition at line 131 of file ShortFieldSource.cs.

override System.String Lucene.Net.Search.Function.ShortFieldSource.Description ( )
virtual

description of field, used in explain()

Reimplemented from Lucene.Net.Search.Function.FieldCacheSource.

Definition at line 107 of file ShortFieldSource.cs.

override DocValues Lucene.Net.Search.Function.ShortFieldSource.GetCachedFieldValues ( FieldCache  cache,
System.String  field,
IndexReader  reader 
)
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

Implements Lucene.Net.Search.Function.FieldCacheSource.

Definition at line 113 of file ShortFieldSource.cs.


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