Package org.apache.lucene.search
Class MultiCollectorManager
java.lang.Object
org.apache.lucene.search.MultiCollectorManager
- All Implemented Interfaces:
CollectorManager<Collector,
Object[]>
A
CollectorManager
implements which wrap a set of CollectorManager
as MultiCollector
acts for Collector
.-
Constructor Summary
ConstructorDescriptionMultiCollectorManager
(CollectorManager<? extends Collector, ?>... collectorManagers) -
Method Summary
Modifier and TypeMethodDescriptionReturn a newCollector
.Object[]
reduce
(Collection<Collector> reducableCollectors) Reduce the results of individual collectors into a meaningful result.
-
Constructor Details
-
MultiCollectorManager
@SafeVarargs public MultiCollectorManager(CollectorManager<? extends Collector, ?>... collectorManagers)
-
-
Method Details
-
newCollector
Description copied from interface:CollectorManager
Return a newCollector
. This must return a different instance on each call.- Specified by:
newCollector
in interfaceCollectorManager<Collector,
Object[]> - Throws:
IOException
-
reduce
Description copied from interface:CollectorManager
Reduce the results of individual collectors into a meaningful result. For instance aTopDocsCollector
would compute thetop docs
of each collector and then merge them usingTopDocs.merge(int, TopDocs[])
. This method must be called after collection is finished on all provided collectors.- Specified by:
reduce
in interfaceCollectorManager<Collector,
Object[]> - Throws:
IOException
-