Class MultiCollector

java.lang.Object
org.apache.lucene.search.MultiCollector
All Implemented Interfaces:
Collector

public class MultiCollector extends Object implements Collector
A Collector which allows running a search with several Collectors. It offers a static wrap(org.apache.lucene.search.Collector...) method which accepts a list of collectors and wraps them with MultiCollector, while filtering out the null null ones.

NOTE:When mixing collectors that want to skip low-scoring hits (ScoreMode.TOP_SCORES) with ones that require to see all hits, such as mixing TopScoreDocCollector and TotalHitCountCollector, it should be faster to run the query twice, once for each collector, rather than using this wrapper on a single search.