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 Modifier and Type Class Description static class
TopGroupsFieldCommand.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.apache.lucene.search.Collector>
create()
Returns a list ofCollector
instances to be included in the search based on the .org.apache.lucene.search.Sort
getGroupSort()
String
getKey()
org.apache.lucene.search.Sort
getWithinGroupSort()
void
postCollect(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 Detail
-
create
public List<org.apache.lucene.search.Collector> create() throws IOException
Description copied from interface:Command
Returns a list ofCollector
instances to be included in the search based on the .- Specified by:
create
in interfaceCommand<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 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 IOException
Description copied from interface:Command
Returns the results that the collectors created byCommand.create()
contain after a search has been executed.- Specified by:
result
in interfaceCommand<org.apache.lucene.search.grouping.TopGroups<org.apache.lucene.util.BytesRef>>
- Returns:
- The results of the collectors
- Throws:
IOException
-
getKey
public String getKey()
-
getGroupSort
public org.apache.lucene.search.Sort getGroupSort()
- Specified by:
getGroupSort
in 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:
getWithinGroupSort
in interfaceCommand<org.apache.lucene.search.grouping.TopGroups<org.apache.lucene.util.BytesRef>>
- Returns:
- The sort inside a group
-
-