Package org.apache.solr.search.grouping
Interface Command<T>
-
- All Known Implementing Classes:
QueryCommand
,SearchGroupsFieldCommand
,TopGroupsFieldCommand
public interface Command<T>
Defines a grouping command. This is an abstraction on how theCollector
instances are created and how the results are retrieved from theCollector
instances.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default 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()
default void
postCollect(org.apache.lucene.search.IndexSearcher searcher)
Run post-collection steps.T
result()
Returns the results that the collectors created bycreate()
contain after a search has been executed.
-
-
-
Method Detail
-
create
List<org.apache.lucene.search.Collector> create() throws IOException
Returns a list ofCollector
instances to be included in the search based on the .- Returns:
- a list of
Collector
instances - Throws:
IOException
- If I/O related errors occur
-
postCollect
default void postCollect(org.apache.lucene.search.IndexSearcher searcher) throws IOException
Run post-collection steps.- Throws:
IOException
- If I/O related errors occur
-
result
T result() throws IOException
Returns the results that the collectors created bycreate()
contain after a search has been executed.- Returns:
- The results of the collectors
- Throws:
IOException
-
getKey
String getKey()
- Returns:
- The key of this command to uniquely identify itself
-
getGroupSort
org.apache.lucene.search.Sort getGroupSort()
- Returns:
- The group sort (overall sort)
-
getWithinGroupSort
org.apache.lucene.search.Sort getWithinGroupSort()
- Returns:
- The sort inside a group
-
-