Lucene.Net
3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
|
Sorts by descending relevance. NOTE: if you are sorting only by descending relevance and then secondarily by ascending docID, peformance is faster using TopScoreDocCollector directly (which Searcher.Search(Query, int) uses when no Sort is specified). More...
Inherits Lucene.Net.Search.FieldComparator.
Public Member Functions | |
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. | |
override void | SetScorer (Scorer scorer) |
Sets the Scorer to use in case a document's score is needed. | |
Properties | |
override IComparable | this[int slot] [get] |
Properties inherited from Lucene.Net.Search.FieldComparator | |
abstract IComparable | this[int slot] [get] |
Return the actual value in the slot. | |
Sorts by descending relevance. NOTE: if you are sorting only by descending relevance and then secondarily by ascending docID, peformance is faster using TopScoreDocCollector directly (which Searcher.Search(Query, int) uses when no Sort is specified).
Definition at line 589 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 600 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 607 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 613 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 622 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 618 of file FieldComparator.cs.
|
virtual |
Sets the Scorer to use in case a document's score is needed.
scorer | Scorer instance that you should use to obtain the current hit's score, if necessary. |
Reimplemented from Lucene.Net.Search.FieldComparator.
Definition at line 627 of file FieldComparator.cs.
|
get |
Definition at line 635 of file FieldComparator.cs.