Class ToParentBlockJoinFieldComparer.Highest
Concrete implementation of ToParentBlockJoinSortField to sorts the parent docs with the highest values in the child / nested docs first.
Inherited Members
Namespace: Lucene.Net.Search.Join
Assembly: Lucene.Net.Join.dll
Syntax
public sealed class ToParentBlockJoinFieldComparer.Highest : ToParentBlockJoinFieldComparer
Constructors
Highest(FieldComparer, Filter, Filter, int)
Declaration
public Highest(FieldComparer wrappedComparer, Filter parentFilter, Filter childFilter, int spareSlot)
Parameters
Type | Name | Description |
---|---|---|
FieldComparer | wrappedComparer | The Lucene.Net.Search.FieldComparer on the child / nested level. |
Filter | parentFilter | Lucene.Net.Search.Filter (must produce Lucene.Net.Util.FixedBitSet per-segment) that identifies the parent documents. |
Filter | childFilter | Lucene.Net.Search.Filter that defines which child / nested documents participates in sorting. |
int | spareSlot | The extra slot inside the wrapped comparer that is used to compare which nested document inside the parent document scope is most competitive. |
Methods
CompareBottom(int)
Compare the bottom of the queue with this doc. This will only invoked after SetBottom(int) 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).
Declaration
public override int CompareBottom(int parentDoc)
Parameters
Type | Name | Description |
---|---|---|
int | parentDoc |
Returns
Type | Description |
---|---|
int | Any N < 0 if the doc's value is sorted after the bottom entry (not competitive), any N > 0 if the doc's value is sorted before the bottom entry and 0 if they are equal. |
Overrides
CompareTop(int)
Compare the top value with this doc. This will only invoked after Lucene.Net.Search.FieldComparer<T>.SetTopValue(T) has been called. This should return the same result as Compare(int, int) as if topValue were slot1 and the new document were slot 2. This is only called for searches that use SearchAfter (deep paging).
Declaration
public override int CompareTop(int parentDoc)
Parameters
Type | Name | Description |
---|---|---|
int | parentDoc |
Returns
Type | Description |
---|---|
int | Any N < 0 if the doc's value is sorted after the bottom entry (not competitive), any N > 0 if the doc's value is sorted before the bottom entry and 0 if they are equal. |
Overrides
Copy(int, int)
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.
Declaration
public override void Copy(int slot, int parentDoc)
Parameters
Type | Name | Description |
---|---|---|
int | slot | Which slot to copy the hit to |
int | parentDoc |