|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.solr.search.Grouping.Command<BytesRef> org.apache.solr.search.Grouping.CommandField
public class Grouping.CommandField
A group command for grouping on a field.
Field Summary | |
---|---|
String |
groupBy
|
Fields inherited from class org.apache.solr.search.Grouping.Command |
---|
docsPerGroup, format, groupOffset, groupSort, key, main, numGroups, offset, sort, totalCount |
Constructor Summary | |
---|---|
Grouping.CommandField()
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.apache.solr.search.Grouping.Command |
---|
addDocList, commonResponse, createSimpleResponse, getDocList |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public String groupBy
Constructor Detail |
---|
public Grouping.CommandField()
Method Detail |
---|
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 search
IOException
- 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 search
IOException
- 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |