Class AllGroupHeadsCollector.GroupHead<T>
java.lang.Object
org.apache.lucene.search.grouping.AllGroupHeadsCollector.GroupHead<T>
- Enclosing class:
- AllGroupHeadsCollector<T>
Represents a group head. A group head is the most relevant document for a particular group. The
relevancy is based is usually based on the sort.
The group head contains a group value with its associated most relevant document id.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract int
compare
(int compIDX, int doc) Compares the specified document for a specified comparator against the current most relevant document.protected void
Called for each segmentprotected abstract void
Called for each segmentprotected abstract void
updateDocHead
(int doc) Updates the current most relevant document with the specified document.
-
Field Details
-
groupValue
-
doc
public int doc -
docBase
protected int docBase
-
-
Constructor Details
-
GroupHead
Create a new GroupHead for the given value
-
-
Method Details
-
setNextReader
Called for each segment- Throws:
IOException
-
setScorer
Called for each segment- Throws:
IOException
-
compare
Compares the specified document for a specified comparator against the current most relevant document.- 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
Updates the current most relevant document with the specified document.- Parameters:
doc
- The specified document- Throws:
IOException
- If I/O related errors occur
-