|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.solr.search.Grouping.Command<GROUP_VALUE_TYPE>
public abstract class Grouping.Command<GROUP_VALUE_TYPE>
General group command. A group command is responsible for creating the first and second pass collectors. A group command is also responsible for creating the response structure.
Note: Maybe the creating the response structure should be done in something like a ReponseBuilder??? Warning NOT thread save!
Field Summary | |
---|---|
int |
docsPerGroup
|
Grouping.Format |
format
|
int |
groupOffset
|
Sort |
groupSort
|
String |
key
|
boolean |
main
|
int |
numGroups
|
int |
offset
|
Sort |
sort
|
Grouping.TotalCount |
totalCount
|
Constructor Summary | |
---|---|
Grouping.Command()
|
Method Summary | |
---|---|
protected void |
addDocList(NamedList rsp,
GroupDocs groups)
|
protected NamedList |
commonResponse()
|
AbstractAllGroupHeadsCollector<?> |
createAllGroupCollector()
Returns a collector that is able to return the most relevant document of all groups. |
protected abstract 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 DocList |
createSimpleResponse()
|
protected abstract void |
finish()
Performs any necessary post actions to prepare the response. |
protected DocList |
getDocList(GroupDocs groups)
|
abstract int |
getMatches()
Returns the number of matches for this Command . |
protected Integer |
getNumberOfGroups()
Returns the number of groups found for this Command . |
protected abstract void |
prepare()
Prepare this Command for execution. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public String key
public Sort groupSort
public Sort sort
public int docsPerGroup
public int groupOffset
public int numGroups
public int offset
public Grouping.Format format
public boolean main
public Grouping.TotalCount totalCount
Constructor Detail |
---|
public Grouping.Command()
Method Detail |
---|
protected abstract void prepare() throws IOException
Command
for execution.
IOException
- If I/O related errors occurprotected abstract 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
.
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
.
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.
IOException
- If I/O related errors occurprotected abstract void finish() throws IOException
IOException
- If I/O related errors occurpublic abstract int getMatches()
Command
.
Command
protected Integer getNumberOfGroups()
Command
.
If the command doesn't support counting the groups null
is returned.
Command
protected NamedList commonResponse()
protected DocList getDocList(GroupDocs groups)
protected void addDocList(NamedList rsp, GroupDocs groups)
protected DocList createSimpleResponse()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |