Method GetComparator
GetComparator(Int32, Int32)
Returns the FieldComparator to use for sorting.
NOTE: This API is experimental and might change in incompatible ways in the next release.
Declaration
public virtual FieldComparator GetComparator(int numHits, int sortPos)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | numHits | number of top hits the queue will store |
System.Int32 | sortPos | position of this SortField within Sort . The comparator is primary if sortPos==0, secondary if sortPos==1, etc. Some comparators can optimize themselves when they are the primary sort. |
Returns
Type | Description |
---|---|
FieldComparator | FieldComparator to use when sorting |