public class Grouping.CommandField extends Grouping.Command<BytesRef>
Modifier and Type | Field and Description |
---|---|
String |
groupBy |
docsPerGroup, format, groupOffset, groupSort, key, main, numGroups, offset, totalCount, withinGroupSort
Constructor and Description |
---|
CommandField() |
Modifier and Type | Method and Description |
---|---|
AllGroupHeadsCollector<?> |
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, populateScoresIfNecessary
public String groupBy
protected void prepare() throws IOException
Grouping.Command
Command
for execution.prepare
in class Grouping.Command<BytesRef>
IOException
- If I/O related errors occurprotected Collector createFirstPassCollector() throws IOException
Grouping.Command
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
Grouping.Command
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 AllGroupHeadsCollector<?> createAllGroupCollector() throws IOException
Grouping.Command
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
Grouping.Command
finish
in class Grouping.Command<BytesRef>
IOException
- If I/O related errors occurpublic int getMatches()
Grouping.Command
Command
.getMatches
in class Grouping.Command<BytesRef>
Command
protected Integer getNumberOfGroups()
Grouping.Command
Command
.
If the command doesn't support counting the groups null
is returned.getNumberOfGroups
in class Grouping.Command<BytesRef>
Command
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.