Class FieldComparator
Expert: a FieldComparator compares hits so as to determine their
sort order when collecting the top results with Top
This API is designed to achieve high performance
sorting, by exposing a tight interaction with Field
A comparator must define these functions:
NOTE: This API is experimental and might change in incompatible ways in the next release.
Inheritance
Namespace:
Assembly: Lucene.Net.NetCore.dll
Syntax
public abstract class FieldComparator : object
Properties
Name | Description |
---|---|
Item[Int32] | Return the actual value in the slot. |
Methods
Name | Description |
---|---|
Binary |
|
Binary |
|
Compare(Int32, Int32) | Compare hit at slot1 with hit at slot2. |
Compare |
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(Int32, Int32) } 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).
|
Copy(Int32, Int32) | 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. |
Set |
Set the bottom slot, ie the "weakest" (sorted last)
entry in the queue. When Compare |
Set |
Set a new Reader. All doc correspond to the current Reader. |
Set |
Sets the Scorer to use in case a document's score is needed. |