Class AllGroupHeadsCollector.GroupHead<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      int doc  
      protected int docBase  
      T groupValue  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected GroupHead​(T groupValue, int doc, int docBase)
      Create a new GroupHead for the given value
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract int compare​(int compIDX, int doc)
      Compares the specified document for a specified comparator against the current most relevant document.
      protected void setNextReader​(LeafReaderContext ctx)
      Called for each segment
      protected abstract void setScorer​(Scorable scorer)
      Called for each segment
      protected abstract void updateDocHead​(int doc)
      Updates the current most relevant document with the specified document.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • groupValue

        public final T groupValue
      • doc

        public int doc
      • docBase

        protected int docBase
    • Constructor Detail

      • GroupHead

        protected GroupHead​(T groupValue,
                            int doc,
                            int docBase)
        Create a new GroupHead for the given value
    • Method Detail

      • setNextReader

        protected void setNextReader​(LeafReaderContext ctx)
                              throws java.io.IOException
        Called for each segment
        Throws:
        java.io.IOException
      • setScorer

        protected abstract void setScorer​(Scorable scorer)
                                   throws java.io.IOException
        Called for each segment
        Throws:
        java.io.IOException
      • compare

        protected abstract int compare​(int compIDX,
                                       int doc)
                                throws java.io.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:
        java.io.IOException - If I/O related errors occur
      • updateDocHead

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