Module org.apache.lucene.grouping
Class AllGroupHeadsCollector.SortingGroupHead<T>
java.lang.Object
org.apache.lucene.search.grouping.AllGroupHeadsCollector.GroupHead<T>
org.apache.lucene.search.grouping.AllGroupHeadsCollector.SortingGroupHead<T>
- Enclosing class:
AllGroupHeadsCollector<T>
private static class AllGroupHeadsCollector.SortingGroupHead<T>
extends AllGroupHeadsCollector.GroupHead<T>
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final FieldComparator[](package private) final LeafFieldComparator[]Fields inherited from class org.apache.lucene.search.grouping.AllGroupHeadsCollector.GroupHead
doc, docBase, groupValue -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSortingGroupHead(Sort sort, T groupValue, int doc, LeafReaderContext context, Scorable scorer) -
Method Summary
Modifier and TypeMethodDescriptionintcompare(int compIDX, int doc) Compares the specified document for a specified comparator against the current most relevant document.voidCalled for each segmentprotected voidCalled for each segmentvoidupdateDocHead(int doc) Updates the current most relevant document with the specified document.
-
Field Details
-
comparators
-
leafComparators
-
-
Constructor Details
-
SortingGroupHead
protected SortingGroupHead(Sort sort, T groupValue, int doc, LeafReaderContext context, Scorable scorer) throws IOException - Throws:
IOException
-
-
Method Details
-
setNextReader
Description copied from class:AllGroupHeadsCollector.GroupHeadCalled for each segment- Overrides:
setNextReaderin classAllGroupHeadsCollector.GroupHead<T>- Throws:
IOException
-
setScorer
Description copied from class:AllGroupHeadsCollector.GroupHeadCalled for each segment- Specified by:
setScorerin classAllGroupHeadsCollector.GroupHead<T>- Throws:
IOException
-
compare
Description copied from class:AllGroupHeadsCollector.GroupHeadCompares the specified document for a specified comparator against the current most relevant document.- Specified by:
comparein classAllGroupHeadsCollector.GroupHead<T>- Parameters:
compIDX- The comparator index of the specified comparator.doc- The specified document.- Returns:
- -1 if the specified document wasn't competitive against the current most relevant document, 1 if the specified document was competitive against the current most relevant document. Otherwise 0.
- Throws:
IOException- If I/O related errors occur
-
updateDocHead
Description copied from class:AllGroupHeadsCollector.GroupHeadUpdates the current most relevant document with the specified document.- Specified by:
updateDocHeadin classAllGroupHeadsCollector.GroupHead<T>- Parameters:
doc- The specified document- Throws:
IOException- If I/O related errors occur
-