org.apache.lucene.search.grouping

Class AllGroupHeadsCollector.GroupHead<T>

  • java.lang.Object
    • org.apache.lucene.search.grouping.AllGroupHeadsCollector.GroupHead<T>
    • Constructor Detail

      • GroupHead

        protected GroupHead(T groupValue,
                            int doc)
    • Method Detail

      • compare

        protected abstract int compare(int compIDX,
                                       int doc)
                                throws IOException
        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

        protected abstract void updateDocHead(int doc)
                                       throws IOException
        Updates the current most relevant document with the specified document.
        Parameters:
        doc - The specified document
        Throws:
        IOException - If I/O related errors occur