C# Class Lucene.Net.Search.FieldComparator.StringOrdValComparator

Sorts by field's natural String sort order, using ordinals. This is functionally equivalent to FieldComparator.StringValComparator , but it first resolves the string to their relative ordinal positions (using the index returned by FieldCache.GetStringIndex), and does most comparisons using the ordinals. For medium to large results, this comparator will be much faster than FieldComparator.StringValComparator. For very small result sets it may be slower.
Inheritance: FieldComparator
Show file Open project: synhershko/lucene.net

Public Methods

Method Description
Compare ( int slot1, int slot2 ) : int
CompareBottom ( int doc ) : int
Copy ( int slot, int doc ) : void
GetValues ( ) : string[]
SetBottom ( int bottom ) : void
SetNextReader ( Lucene.Net.Index.IndexReader reader, int docBase ) : void
StringOrdValComparator ( int numHits, System field, int sortPos, bool reversed ) : System
this ( int slot ) : IComparable

Private Methods

Method Description
Convert ( int slot ) : void

Method Details

Compare() public method

public Compare ( int slot1, int slot2 ) : int
slot1 int
slot2 int
return int

CompareBottom() public method

public CompareBottom ( int doc ) : int
doc int
return int

Copy() public method

public Copy ( int slot, int doc ) : void
slot int
doc int
return void

GetValues() public method

public GetValues ( ) : string[]
return string[]

SetBottom() public method

public SetBottom ( int bottom ) : void
bottom int
return void

SetNextReader() public method

public SetNextReader ( Lucene.Net.Index.IndexReader reader, int docBase ) : void
reader Lucene.Net.Index.IndexReader
docBase int
return void

StringOrdValComparator() public method

public StringOrdValComparator ( int numHits, System field, int sortPos, bool reversed ) : System
numHits int
field System
sortPos int
reversed bool
return System

this() public method

public this ( int slot ) : IComparable
slot int
return IComparable