Package org.elasticsearch.search.sort
Class ShardDocSortField
java.lang.Object
org.apache.lucene.search.SortField
org.elasticsearch.search.sort.ShardDocSortField
public class ShardDocSortField
extends org.apache.lucene.search.SortField
A
SortField
that first compares the shard index and then uses the document number (_doc)
to tiebreak if the value is the same.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.SortField
org.apache.lucene.search.SortField.Provider, org.apache.lucene.search.SortField.Type
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NAME
Fields inherited from class org.apache.lucene.search.SortField
FIELD_DOC, FIELD_SCORE, missingValue, STRING_FIRST, STRING_LAST
-
Constructor Summary
Constructors Constructor Description ShardDocSortField(int shardRequestIndex, boolean reverse)
-
Method Summary
Modifier and Type Method Description org.apache.lucene.search.FieldComparator<?>
getComparator(int numHits, int sortPos)
Methods inherited from class org.apache.lucene.search.SortField
equals, getBytesComparator, getCanUsePoints, getComparatorSource, getField, getIndexSorter, getMissingValue, getReverse, getType, hashCode, needsScores, readType, rewrite, setBytesComparator, setCanUsePoints, setMissingValue, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
NAME
public static final java.lang.String NAME- See Also:
- Constant Field Values
-
-
Constructor Details
-
ShardDocSortField
public ShardDocSortField(int shardRequestIndex, boolean reverse)
-
-
Method Details
-
getComparator
public org.apache.lucene.search.FieldComparator<?> getComparator(int numHits, int sortPos)- Overrides:
getComparator
in classorg.apache.lucene.search.SortField
-