public class Grouping.CommandField extends Grouping.Command<BytesRef>
Modifier and Type | Field and Description |
---|---|
String |
groupBy |
docsPerGroup, format, groupOffset, groupSort, key, main, numGroups, offset, sort, totalCount
Constructor and Description |
---|
Grouping.CommandField() |
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 String groupBy
protected void prepare() throws IOException
Command
for execution.prepare
in class Grouping.Command<BytesRef>
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<BytesRef>
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<BytesRef>
Collector
instances that are needed to perform the second pass searchIOException
- If I/O related errors occurpublic AbstractAllGroupHeadsCollector<?> createAllGroupCollector() throws IOException
null
if the command doesn't support this type of collector.createAllGroupCollector
in class Grouping.Command<BytesRef>
IOException
- If I/O related errors occurprotected void finish() throws IOException
finish
in class Grouping.Command<BytesRef>
IOException
- If I/O related errors occurpublic int getMatches()
Command
.getMatches
in class Grouping.Command<BytesRef>
Command
protected Integer getNumberOfGroups()
Command
.
If the command doesn't support counting the groups null
is returned.getNumberOfGroups
in class Grouping.Command<BytesRef>
Command
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.