public abstract class Grouping.Command<GROUP_VALUE_TYPE>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) int |
actualGroupsToFind |
int |
docsPerGroup |
Grouping.Format |
format |
int |
groupOffset |
org.apache.lucene.search.Sort |
groupSort |
java.lang.String |
key |
boolean |
main |
int |
numGroups |
int |
offset |
(package private) org.apache.lucene.search.grouping.TopGroups<GROUP_VALUE_TYPE> |
result |
org.apache.lucene.search.Sort |
sort |
Grouping.TotalCount |
totalCount |
Constructor and Description |
---|
Command() |
Modifier and Type | Method and Description |
---|---|
protected void |
addDocList(NamedList rsp,
org.apache.lucene.search.grouping.GroupDocs groups) |
protected NamedList |
commonResponse() |
org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector<?> |
createAllGroupCollector()
Returns a collector that is able to return the most relevant document of all groups.
|
protected abstract 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 DocList |
createSimpleResponse() |
protected abstract void |
finish()
Performs any necessary post actions to prepare the response.
|
protected DocList |
getDocList(org.apache.lucene.search.grouping.GroupDocs groups) |
abstract 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 abstract void |
prepare()
Prepare this
Command for execution. |
public java.lang.String key
public org.apache.lucene.search.Sort groupSort
public org.apache.lucene.search.Sort sort
public int docsPerGroup
public int groupOffset
public int numGroups
int actualGroupsToFind
public int offset
public Grouping.Format format
public boolean main
public Grouping.TotalCount totalCount
org.apache.lucene.search.grouping.TopGroups<GROUP_VALUE_TYPE> result
protected abstract void prepare() throws java.io.IOException
Command
for execution.java.io.IOException
- If I/O related errors occurprotected abstract 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
.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
.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.java.io.IOException
- If I/O related errors occurprotected abstract void finish() throws java.io.IOException
java.io.IOException
- If I/O related errors occurpublic abstract int getMatches()
Command
.Command
protected java.lang.Integer getNumberOfGroups()
Command
.
If the command doesn't support counting the groups null
is returned.Command
protected NamedList commonResponse()
protected DocList getDocList(org.apache.lucene.search.grouping.GroupDocs groups)
protected void addDocList(NamedList rsp, org.apache.lucene.search.grouping.GroupDocs groups)
protected DocList createSimpleResponse()