public class MultiCollectorManager extends Object implements CollectorManager<MultiCollectorManager.Collectors,Object[]>
CollectorManager
implements which wrap a set of CollectorManager
as MultiCollector
acts for Collector
.Modifier and Type | Class and Description |
---|---|
class |
MultiCollectorManager.Collectors |
Constructor and Description |
---|
MultiCollectorManager(CollectorManager<? extends Collector,?>... collectorManagers) |
Modifier and Type | Method and Description |
---|---|
MultiCollectorManager.Collectors |
newCollector()
Return a new
Collector . |
Object[] |
reduce(Collection<MultiCollectorManager.Collectors> reducableCollectors)
Reduce the results of individual collectors into a meaningful result.
|
@SafeVarargs public MultiCollectorManager(CollectorManager<? extends Collector,?>... collectorManagers)
public MultiCollectorManager.Collectors newCollector() throws IOException
CollectorManager
Collector
. This must return a different instance on
each call.newCollector
in interface CollectorManager<MultiCollectorManager.Collectors,Object[]>
IOException
public Object[] reduce(Collection<MultiCollectorManager.Collectors> reducableCollectors) throws IOException
CollectorManager
TopDocsCollector
would compute the
top docs
of each collector and then
merge them using TopDocs.merge(int, TopDocs[])
.
This method must be called after collection is finished on all provided
collectors.reduce
in interface CollectorManager<MultiCollectorManager.Collectors,Object[]>
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.