protected class PhraseWildcardQuery.SegmentTermsSizeComparator extends Object implements Comparator<LeafReaderContext>
This is used to sort segments incrementally by number of terms. This way the first segment to search is the smallest, so a term has the lowest probability to match in this segment. And if the term does not match, we credit unused expansions when searching the other next segments.
| Modifier | Constructor and Description |
|---|---|
protected |
SegmentTermsSizeComparator() |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(LeafReaderContext leafReaderContext1,
LeafReaderContext leafReaderContext2) |
protected List<LeafReaderContext> |
createTermsSizeSortedCopyOf(List<LeafReaderContext> segments) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic int compare(LeafReaderContext leafReaderContext1, LeafReaderContext leafReaderContext2)
compare in interface Comparator<LeafReaderContext>protected List<LeafReaderContext> createTermsSizeSortedCopyOf(List<LeafReaderContext> segments) throws IOException
IOExceptionCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.