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.
|
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. More...
Inherits Lucene.Net.Search.FieldComparator.
Public Member Functions | |
StringOrdValComparator (int numHits, System.String field, int sortPos, bool reversed) | |
override int | Compare (int slot1, int slot2) |
Compare hit at slot1 with hit at slot2. | |
override int | CompareBottom (int doc) |
Compare the bottom of the queue with doc. This will only invoked after setBottom has been called. This should return the same result as Compare(int,int) } as if bottom were slot1 and the new document were slot 2. | |
override void | Copy (int slot, int doc) |
This method is called when a new hit is competitive. You should copy any state associated with this document that will be required for future comparisons, into the specified slot. | |
override void | SetNextReader (IndexReader reader, int docBase) |
Set a new Reader. All doc correspond to the current Reader. | |
override void | SetBottom (int bottom) |
Set the bottom slot, ie the "weakest" (sorted last) entry in the queue. When CompareBottom is called, you should compare against this slot. This will always be called before CompareBottom. | |
string[] | GetValues () |
Public Member Functions inherited from Lucene.Net.Search.FieldComparator | |
virtual void | SetScorer (Scorer scorer) |
Sets the Scorer to use in case a document's score is needed. | |
Properties | |
override IComparable | this[int slot] [get] |
int | BottomSlot [get] |
string | Field [get] |
Properties inherited from Lucene.Net.Search.FieldComparator | |
abstract IComparable | this[int slot] [get] |
Return the actual value in the slot. | |
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.
Definition at line 776 of file FieldComparator.cs.
Lucene.Net.Search.FieldComparator.StringOrdValComparator.StringOrdValComparator | ( | int | numHits, |
System.String | field, | ||
int | sortPos, | ||
bool | reversed | ||
) |
Definition at line 794 of file FieldComparator.cs.
|
virtual |
Compare hit at slot1 with hit at slot2.
slot1 | first slot to compare |
slot2 | second slot to compare |
Implements Lucene.Net.Search.FieldComparator.
Definition at line 804 of file FieldComparator.cs.
|
virtual |
Compare the bottom of the queue with doc. This will only invoked after setBottom has been called. This should return the same result as Compare(int,int) } as if bottom were slot1 and the new document were slot 2.
For a search that hits many results, this method will be the hotspot (invoked by far the most frequently).
doc | that was hit |
Implements Lucene.Net.Search.FieldComparator.
Definition at line 832 of file FieldComparator.cs.
|
virtual |
This method is called when a new hit is competitive. You should copy any state associated with this document that will be required for future comparisons, into the specified slot.
slot | which slot to copy the hit to |
doc | docID relative to current reader |
Implements Lucene.Net.Search.FieldComparator.
Definition at line 898 of file FieldComparator.cs.
string [] Lucene.Net.Search.FieldComparator.StringOrdValComparator.GetValues | ( | ) |
Definition at line 939 of file FieldComparator.cs.
|
virtual |
Set the bottom slot, ie the "weakest" (sorted last) entry in the queue. When CompareBottom is called, you should compare against this slot. This will always be called before CompareBottom.
slot | the currently weakest (sorted last) slot in the queue |
Implements Lucene.Net.Search.FieldComparator.
Definition at line 921 of file FieldComparator.cs.
|
virtual |
Set a new Reader. All doc correspond to the current Reader.
reader | current reader |
docBase | docBase of this reader |
<throws> IOException </throws> <throws> IOException </throws>
Implements Lucene.Net.Search.FieldComparator.
Definition at line 907 of file FieldComparator.cs.
|
get |
Definition at line 945 of file FieldComparator.cs.
|
get |
Definition at line 950 of file FieldComparator.cs.
|
get |
Definition at line 935 of file FieldComparator.cs.