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.
| 限定符 | 构造器和说明 |
|---|---|
protected |
SegmentTermsSizeComparator() |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
compare(LeafReaderContext leafReaderContext1,
LeafReaderContext leafReaderContext2) |
protected List<LeafReaderContext> |
createTermsSizeSortedCopyOf(List<LeafReaderContext> segments) |
public int compare(LeafReaderContext leafReaderContext1, LeafReaderContext leafReaderContext2)
compare 在接口中 Comparator<LeafReaderContext>protected List<LeafReaderContext> createTermsSizeSortedCopyOf(List<LeafReaderContext> segments) throws IOException
IOExceptionCopyright © 2022. All rights reserved.