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 | Public Attributes | List of all members
Lucene.Net.Search.Function.ReverseOrdFieldSource Class Reference

Expert: obtains the ordinal of the field value from the default Lucene FieldCache using getStringIndex() and reverses the order. The native lucene index order is used to assign an ordinal value for each field value. Field values (terms) are lexicographically ordered by unicode value, and numbered starting at 1.
Example of reverse ordinal (rord):
If there were only three field values: "apple","banana","pear"
then rord("apple")=3, rord("banana")=2, ord("pear")=1 WARNING: rord() depends on the position in an index and can thus change when other documents are inserted or deleted, or if a MultiSearcher is used. More...

Inherits Lucene.Net.Search.Function.ValueSource.

Public Member Functions

 ReverseOrdFieldSource (System.String field)
 Contructor for a certain field.
 
override System.String Description ()
 description of field, used in explain()
 
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 ()
 

Public Attributes

System.String field
 

Detailed Description

Expert: obtains the ordinal of the field value from the default Lucene FieldCache using getStringIndex() and reverses the order.

The native lucene index order is used to assign an ordinal value for each field value.

Field values (terms) are lexicographically ordered by unicode value, and numbered starting at 1.
Example of reverse ordinal (rord):
If there were only three field values: "apple","banana","pear"
then rord("apple")=3, rord("banana")=2, ord("pear")=1

WARNING: rord() depends on the position in an index and can thus change when other documents are inserted or deleted, or if a MultiSearcher is used.

<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 57 of file ReverseOrdFieldSource.cs.

Constructor & Destructor Documentation

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

Contructor for a certain field.

Parameters
fieldfield whose values reverse order is used.

Definition at line 115 of file ReverseOrdFieldSource.cs.

Member Function Documentation

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

description of field, used in explain()

Implements Lucene.Net.Search.Function.ValueSource.

Definition at line 121 of file ReverseOrdFieldSource.cs.

override bool Lucene.Net.Search.Function.ReverseOrdFieldSource.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 138 of file ReverseOrdFieldSource.cs.

override int Lucene.Net.Search.Function.ReverseOrdFieldSource.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 149 of file ReverseOrdFieldSource.cs.

override DocValues Lucene.Net.Search.Function.ReverseOrdFieldSource.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 127 of file ReverseOrdFieldSource.cs.

Member Data Documentation

System.String Lucene.Net.Search.Function.ReverseOrdFieldSource.field

Definition at line 110 of file ReverseOrdFieldSource.cs.


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