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
`class` `MultiCollectorManager.Collectors`

### Constructor Summary

Constructors
Constructor and Description
`MultiCollectorManager(CollectorManager<? extends Collector,?>... collectorManagers)`

### Method Summary

All Methods Instance Methods Concrete Methods
`MultiCollectorManager.Collectors` `newCollector()` Return a new `Collector`.
`Object[]` `reduce(Collection<MultiCollectorManager.Collectors> reducableCollectors)` Reduce the results of individual collectors into a meaningful result.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### MultiCollectorManager

    @SafeVarargs
    public MultiCollectorManager(CollectorManager<? extends Collector,?>... collectorManagers)

### Method Detail

#### newCollector

    public MultiCollectorManager.Collectors newCollector()
                                                  throws IOException

Description copied from interface: `CollectorManager`
Return a new `Collector`. This must return a different instance on each call.

Specified by:
  `newCollector` in interface `CollectorManager<MultiCollectorManager.Collectors,Object[]>`
Throws:
  `IOException`

#### reduce

    public Object[] reduce(Collection<MultiCollectorManager.Collectors> reducableCollectors)
                    throws IOException

Description copied from interface: `CollectorManager`
Reduce the results of individual collectors into a meaningful result. For instance a `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.

Specified by:
  `reduce` in interface `CollectorManager<MultiCollectorManager.Collectors,Object[]>`
Throws:
  `IOException`