public class Grouping.CommandField extends Grouping.Command<java.lang.String>
Modifier and Type | Field and Description |
---|---|
(package private) org.apache.lucene.search.grouping.TermAllGroupsCollector |
allGroupsCollector |
(package private) org.apache.lucene.search.TotalHitCountCollector |
fallBackCollector |
(package private) org.apache.lucene.search.grouping.TermFirstPassGroupingCollector |
firstPass |
java.lang.String |
groupBy |
(package private) org.apache.lucene.search.grouping.TermSecondPassGroupingCollector |
secondPass |
(package private) java.util.Collection<org.apache.lucene.search.grouping.SearchGroup<java.lang.String>> |
topGroups |
actualGroupsToFind, docsPerGroup, format, groupOffset, groupSort, key, main, numGroups, offset, result, sort, totalCount
Constructor and Description |
---|
CommandField() |
Modifier and Type | Method and Description |
---|---|
org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector<?> |
createAllGroupCollector()
Returns a collector that is able to return the most relevant document of all groups.
|
protected org.apache.lucene.search.Collector |
createFirstPassCollector()
Returns one or more
Collector instances that are needed to perform the first pass search. |
protected org.apache.lucene.search.Collector |
createSecondPassCollector()
Returns zero or more
Collector instances that are needed to perform the second pass search. |
protected void |
finish()
Performs any necessary post actions to prepare the response.
|
int |
getMatches()
Returns the number of matches for this
Command . |
protected java.lang.Integer |
getNumberOfGroups()
Returns the number of groups found for this
Command . |
protected void |
prepare()
Prepare this
Command for execution. |
addDocList, commonResponse, createSimpleResponse, getDocList
public java.lang.String groupBy
org.apache.lucene.search.grouping.TermFirstPassGroupingCollector firstPass
org.apache.lucene.search.grouping.TermSecondPassGroupingCollector secondPass
org.apache.lucene.search.grouping.TermAllGroupsCollector allGroupsCollector
org.apache.lucene.search.TotalHitCountCollector fallBackCollector
java.util.Collection<org.apache.lucene.search.grouping.SearchGroup<java.lang.String>> topGroups
protected void prepare() throws java.io.IOException
Command
for execution.prepare
in class Grouping.Command<java.lang.String>
java.io.IOException
- If I/O related errors occurprotected org.apache.lucene.search.Collector createFirstPassCollector() throws java.io.IOException
Collector
instances that are needed to perform the first pass search.
If multiple Collectors are returned then these wrapped in a MultiCollector
.createFirstPassCollector
in class Grouping.Command<java.lang.String>
Collector
instances that are need to perform the first pass searchjava.io.IOException
- If I/O related errors occurprotected org.apache.lucene.search.Collector createSecondPassCollector() throws java.io.IOException
Collector
instances that are needed to perform the second pass search.
In the case when no Collector
instances are created null
is returned.
If multiple Collectors are returned then these wrapped in a MultiCollector
.createSecondPassCollector
in class Grouping.Command<java.lang.String>
Collector
instances that are needed to perform the second pass searchjava.io.IOException
- If I/O related errors occurpublic org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector<?> createAllGroupCollector() throws java.io.IOException
null
if the command doesn't support this type of collector.createAllGroupCollector
in class Grouping.Command<java.lang.String>
java.io.IOException
- If I/O related errors occurprotected void finish() throws java.io.IOException
finish
in class Grouping.Command<java.lang.String>
java.io.IOException
- If I/O related errors occurpublic int getMatches()
Command
.getMatches
in class Grouping.Command<java.lang.String>
Command
protected java.lang.Integer getNumberOfGroups()
Command
.
If the command doesn't support counting the groups null
is returned.getNumberOfGroups
in class Grouping.Command<java.lang.String>
Command