Package org.apache.lucene.search
Class MultiCollectorManager
java.lang.Object
org.apache.lucene.search.MultiCollectorManager
- All Implemented Interfaces:
CollectorManager<MultiCollectorManager.Collectors,Object[]>
public class MultiCollectorManager
extends Object
implements CollectorManager<MultiCollectorManager.Collectors,Object[]>
A
CollectorManager implements which wrap a set of CollectorManager
as MultiCollector acts for Collector.-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMultiCollectorManager(CollectorManager<? extends Collector, ?>... collectorManagers) -
Method Summary
Modifier and TypeMethodDescriptionReturn a newCollector.Object[]reduce(Collection<MultiCollectorManager.Collectors> reducableCollectors) Reduce the results of individual collectors into a meaningful result.
-
Field Details
-
collectorManagers
-
-
Constructor Details
-
MultiCollectorManager
@SafeVarargs public MultiCollectorManager(CollectorManager<? extends Collector, ?>... collectorManagers)
-
-
Method Details
-
newCollector
Description copied from interface:CollectorManagerReturn a newCollector. This must return a different instance on each call.- Specified by:
newCollectorin interfaceCollectorManager<MultiCollectorManager.Collectors,Object[]> - Throws:
IOException
-
reduce
public Object[] reduce(Collection<MultiCollectorManager.Collectors> reducableCollectors) throws IOException Description copied from interface:CollectorManagerReduce the results of individual collectors into a meaningful result. For instance aTopDocsCollectorwould compute thetop docsof 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:
reducein interfaceCollectorManager<MultiCollectorManager.Collectors,Object[]> - Throws:
IOException
-