public class Grouping.CommandFunc extends Grouping.Command<MutableValue>
Modifier and Type | Field and Description |
---|---|
ValueSource |
groupBy |
docsPerGroup, format, groupOffset, groupSort, key, main, numGroups, offset, sort, totalCount
Constructor and Description |
---|
Grouping.CommandFunc() |
Modifier and Type | Method and Description |
---|---|
AbstractAllGroupHeadsCollector<?> |
createAllGroupCollector()
Returns a collector that is able to return the most relevant document of all groups.
|
protected Collector |
createFirstPassCollector()
Returns one or more
Collector instances that are needed to perform the first pass search. |
protected 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 Integer |
getNumberOfGroups()
Returns the number of groups found for this
Command . |
protected void |
prepare()
Prepare this
Command for execution. |
addDocList, commonResponse, createSimpleResponse, getDocList
public ValueSource groupBy
protected void prepare() throws IOException
Command
for execution.prepare
in class Grouping.Command<MutableValue>
IOException
- If I/O related errors occurprotected Collector createFirstPassCollector() throws 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<MutableValue>
Collector
instances that are need to perform the first pass searchIOException
- If I/O related errors occurprotected Collector createSecondPassCollector() throws 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<MutableValue>
Collector
instances that are needed to perform the second pass searchIOException
- If I/O related errors occurpublic AbstractAllGroupHeadsCollector<?> createAllGroupCollector() throws IOException
Grouping.Command
null
if the command doesn't support this type of collector.createAllGroupCollector
in class Grouping.Command<MutableValue>
IOException
- If I/O related errors occurprotected void finish() throws IOException
finish
in class Grouping.Command<MutableValue>
IOException
- If I/O related errors occurpublic int getMatches()
Command
.getMatches
in class Grouping.Command<MutableValue>
Command
protected Integer getNumberOfGroups()
Command
.
If the command doesn't support counting the groups null
is returned.getNumberOfGroups
in class Grouping.Command<MutableValue>
Command
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.