Class TopGroupsFieldCommand

java.lang.Object
org.apache.solr.search.grouping.distributed.command.TopGroupsFieldCommand
All Implemented Interfaces:
Command<org.apache.lucene.search.grouping.TopGroups<org.apache.lucene.util.BytesRef>>

public class TopGroupsFieldCommand extends Object implements Command<org.apache.lucene.search.grouping.TopGroups<org.apache.lucene.util.BytesRef>>
Defines all collectors for retrieving the second phase and how to handle the collector result.
  • Method Details

    • create

      public List<org.apache.lucene.search.Collector> create() throws IOException
      Description copied from interface: Command
      Returns a list of Collector instances to be included in the search based on the .
      Specified by:
      create in interface Command<org.apache.lucene.search.grouping.TopGroups<org.apache.lucene.util.BytesRef>>
      Returns:
      a list of Collector instances
      Throws:
      IOException - If I/O related errors occur
    • postCollect

      public void postCollect(org.apache.lucene.search.IndexSearcher searcher) throws IOException
      Description copied from interface: Command
      Run post-collection steps.
      Specified by:
      postCollect in interface Command<org.apache.lucene.search.grouping.TopGroups<org.apache.lucene.util.BytesRef>>
      Throws:
      IOException - If I/O related errors occur
    • result

      public org.apache.lucene.search.grouping.TopGroups<org.apache.lucene.util.BytesRef> result() throws IOException
      Description copied from interface: Command
      Returns the results that the collectors created by Command.create() contain after a search has been executed.
      Specified by:
      result in interface Command<org.apache.lucene.search.grouping.TopGroups<org.apache.lucene.util.BytesRef>>
      Returns:
      The results of the collectors
      Throws:
      IOException
    • getKey

      public String getKey()
      Specified by:
      getKey in interface Command<org.apache.lucene.search.grouping.TopGroups<org.apache.lucene.util.BytesRef>>
      Returns:
      The key of this command to uniquely identify itself
    • getGroupSort

      public org.apache.lucene.search.Sort getGroupSort()
      Specified by:
      getGroupSort in interface Command<org.apache.lucene.search.grouping.TopGroups<org.apache.lucene.util.BytesRef>>
      Returns:
      The group sort (overall sort)
    • getWithinGroupSort

      public org.apache.lucene.search.Sort getWithinGroupSort()
      Specified by:
      getWithinGroupSort in interface Command<org.apache.lucene.search.grouping.TopGroups<org.apache.lucene.util.BytesRef>>
      Returns:
      The sort inside a group