private class TotalHitsComparator.HitsComp
extends Object
implements ScoreDocComparator
| Modifier | Constructor and Description |
|---|---|
private |
HitsComp() |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(ScoreDoc d1,
ScoreDoc d2)
Compares two ScoreDoc objects and returns a result indicating their
sort order.
|
int |
sortType()
Returns the type of sort.
|
Comparable |
sortValue(ScoreDoc doc)
Returns the value used to sort the given document.
|
public int compare(ScoreDoc d1,
ScoreDoc d2)
compare in interface ScoreDocComparatord1 - First ScoreDocd2 - Second ScoreDoc-1 if i should come before j1 if i should come after j0 if they are equalComparatorpublic Comparable sortValue(ScoreDoc doc)
sortValue in interface ScoreDocComparatordoc - The documentpublic int sortType()
SortField.SCORE, SortField.DOC, SortField.STRING, SortField.INTEGER,
SortField.FLOAT or SortField.CUSTOM. It is not valid to return SortField.AUTO.
This is used by multisearchers to determine how to collate results from their searchers.sortType in interface ScoreDocComparatorSortField