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
Fields Modifier and Type Field Description (package private) FieldComparator[]comparators(package private) LeafFieldComparator[]leafComparators-
Fields inherited from class org.apache.lucene.search.grouping.AllGroupHeadsCollector.GroupHead
doc, docBase, groupValue
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSortingGroupHead(Sort sort, T groupValue, int doc, LeafReaderContext context, Scorable scorer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(int compIDX, int doc)Compares the specified document for a specified comparator against the current most relevant document.voidsetNextReader(LeafReaderContext ctx)Called for each segmentprotected voidsetScorer(Scorable scorer)Called for each segmentvoidupdateDocHead(int doc)Updates the current most relevant document with the specified document.
-
-
-
Field Detail
-
comparators
final FieldComparator[] comparators
-
leafComparators
final LeafFieldComparator[] leafComparators
-
-
Constructor Detail
-
SortingGroupHead
protected SortingGroupHead(Sort sort, T groupValue, int doc, LeafReaderContext context, Scorable scorer) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
setNextReader
public void setNextReader(LeafReaderContext ctx) throws java.io.IOException
Description copied from class:AllGroupHeadsCollector.GroupHeadCalled for each segment- Overrides:
setNextReaderin classAllGroupHeadsCollector.GroupHead<T>- Throws:
java.io.IOException
-
setScorer
protected void setScorer(Scorable scorer) throws java.io.IOException
Description copied from class:AllGroupHeadsCollector.GroupHeadCalled for each segment- Specified by:
setScorerin classAllGroupHeadsCollector.GroupHead<T>- Throws:
java.io.IOException
-
compare
public int compare(int compIDX, int doc) throws java.io.IOExceptionDescription 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:
java.io.IOException- If I/O related errors occur
-
updateDocHead
public void updateDocHead(int doc) throws java.io.IOExceptionDescription 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:
java.io.IOException- If I/O related errors occur
-
-