|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectSparseStringComparator.SparseComp
private class SparseStringComparator.SparseComp
| Field Summary | |
|---|---|
(package private) ArrayList |
entries
|
(package private) boolean |
flipEmpty
|
| Fields inherited from interface ScoreDocComparator |
|---|
INDEXORDER, RELEVANCE |
| Constructor Summary | |
|---|---|
SparseStringComparator.SparseComp(IndexReader reader,
String field)
|
|
| Method Summary | |
|---|---|
int |
compare(ScoreDoc d1,
ScoreDoc d2)
Compares two ScoreDoc objects and returns a result indicating their sort order. |
private SparseStringComparator.Entry |
findEntry(int docId)
Retrieve the entry for a given document, or null if not found. |
int |
sortType()
Returns the type of sort. |
Comparable |
sortValue(ScoreDoc i)
Returns the value used to sort the given document. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
ArrayList entries
boolean flipEmpty
| Constructor Detail |
|---|
SparseStringComparator.SparseComp(IndexReader reader,
String field)
throws IOException
IOException| Method Detail |
|---|
private SparseStringComparator.Entry findEntry(int docId)
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 i)
sortValue in interface ScoreDocComparatori - Document
public 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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||