org.apache.lucene.search.grouping.function

## Class FunctionAllGroupHeadsCollector.FunctionGroupHead

- java.lang.Object
- - org.apache.lucene.search.grouping.AllGroupHeadsCollector.GroupHead<MutableValue>
  - - org.apache.lucene.search.grouping.function.FunctionAllGroupHeadsCollector.FunctionGroupHead

- Enclosing class:
    FunctionAllGroupHeadsCollector

      public class FunctionAllGroupHeadsCollector.FunctionGroupHead
      extends AllGroupHeadsCollector.GroupHead<MutableValue>

  Holds current head document for a single group.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.search.grouping.AllGroupHeadsCollector.GroupHead

      `doc, groupValue`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(int compIDX, int doc)` Compares the specified document for a specified comparator against the current most relevant document.
    `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`

- - ### Method Detail

    - #### compare

          public int compare(int compIDX,
                             int doc)
                      throws IOException

      Description copied from class: `AllGroupHeadsCollector.GroupHead`
      Compares the specified document for a specified comparator against the current most relevant document.
      Specified by:
        `compare` in class `AllGroupHeadsCollector.GroupHead<MutableValue>`
      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

          public void updateDocHead(int doc)
                             throws IOException

      Description copied from class: `AllGroupHeadsCollector.GroupHead`
      Updates the current most relevant document with the specified document.
      Specified by:
        `updateDocHead` in class `AllGroupHeadsCollector.GroupHead<MutableValue>`
      Parameters:
        `doc` - The specified document
      Throws:
        `IOException` - If I/O related errors occur

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.