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.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionList<org.apache.lucene.search.Collector> create()Returns a list ofCollectorinstances to be included in the search based on the .org.apache.lucene.search.SortgetKey()org.apache.lucene.search.SortvoidpostCollect(org.apache.lucene.search.IndexSearcher searcher) Run post-collection steps.org.apache.lucene.search.grouping.TopGroups<org.apache.lucene.util.BytesRef> result()Returns the results that the collectors created byCommand.create()contain after a search has been executed.
-
Method Details
-
create
Description copied from interface:CommandReturns a list ofCollectorinstances to be included in the search based on the .- Specified by:
createin interfaceCommand<org.apache.lucene.search.grouping.TopGroups<org.apache.lucene.util.BytesRef>>- Returns:
- a list of
Collectorinstances - Throws:
IOException- If I/O related errors occur
-
postCollect
Description copied from interface:CommandRun post-collection steps.- Specified by:
postCollectin interfaceCommand<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 IOExceptionDescription copied from interface:CommandReturns the results that the collectors created byCommand.create()contain after a search has been executed.- Specified by:
resultin interfaceCommand<org.apache.lucene.search.grouping.TopGroups<org.apache.lucene.util.BytesRef>>- Returns:
- The results of the collectors
- Throws:
IOException
-
getKey
-
getGroupSort
public org.apache.lucene.search.Sort getGroupSort()- Specified by:
getGroupSortin interfaceCommand<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:
getWithinGroupSortin interfaceCommand<org.apache.lucene.search.grouping.TopGroups<org.apache.lucene.util.BytesRef>>- Returns:
- The sort inside a group
-