java.lang.Object
org.apache.lucene.util.Sorter
org.apache.lucene.util.StringSorter
- Direct Known Subclasses:
StableStringSorter
A
BytesRef sorter tries to use a efficient radix sorter if cmp is a
BytesRefComparator, otherwise fallback to fallbackSorter(java.util.Comparator<org.apache.lucene.util.BytesRef>)-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Comparator<BytesRef> protected final BytesRefprotected final BytesRefBuilderprotected final BytesRefBuilderprotected final BytesRefBuilderprotected final BytesRefprotected final BytesRefFields inherited from class org.apache.lucene.util.Sorter
BINARY_SORT_THRESHOLD, INSERTION_SORT_THRESHOLD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intcompare(int i, int j) Compare entries found in slotsiandj.protected SorterfallbackSorter(Comparator<BytesRef> cmp) protected abstract voidget(BytesRefBuilder builder, BytesRef result, int i) protected Sortervoidsort(int from, int to) Sort the slice which starts atfrom(inclusive) and ends atto(exclusive).Methods inherited from class org.apache.lucene.util.Sorter
binarySort, binarySort, checkRange, comparePivot, doRotate, heapChild, heapify, heapParent, heapSort, insertionSort, lower, lower2, mergeInPlace, reverse, rotate, setPivot, siftDown, swap, upper, upper2
-
Field Details
-
cmp
-
scratch1
-
scratch2
-
pivotBuilder
-
scratchBytes1
-
scratchBytes2
-
pivot
-
-
Constructor Details
-
StringSorter
-
-
Method Details
-
get
-
compare
protected int compare(int i, int j) Description copied from class:SorterCompare entries found in slotsiandj. The contract for the returned value is the same asComparator.compare(Object, Object). -
sort
public void sort(int from, int to) Description copied from class:SorterSort the slice which starts atfrom(inclusive) and ends atto(exclusive). -
radixSorter
-
fallbackSorter
-