Class MultiCollector
A ICollector which allows running a search with several
ICollectors. It offers a static Wrap(ICollector[]) method which accepts a
list of collectors and wraps them with MultiCollector, while
filtering out the null
ones.
Inheritance
System.Object
MultiCollector
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.dll
Syntax
public class MultiCollector : ICollector
Properties
| Improve this Doc View SourceAcceptsDocsOutOfOrder
Declaration
public virtual bool AcceptsDocsOutOfOrder { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceCollect(Int32)
Declaration
public virtual void Collect(int doc)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | doc |
SetNextReader(AtomicReaderContext)
Declaration
public virtual void SetNextReader(AtomicReaderContext context)
Parameters
Type | Name | Description |
---|---|---|
AtomicReaderContext | context |
SetScorer(Scorer)
Declaration
public virtual void SetScorer(Scorer scorer)
Parameters
Type | Name | Description |
---|---|---|
Scorer | scorer |
Wrap(ICollector[])
Wraps a list of ICollectors with a MultiCollector. This method works as follows:
- Filters out the
null
collectors, so they are not used during search time. - If the input contains 1 real collector (i.e. non-
null
), it is returned. - Otherwise the method returns a MultiCollector which wraps the
non-
ones.null
Declaration
public static ICollector Wrap(params ICollector[] collectors)
Parameters
Type | Name | Description |
---|---|---|
ICollector[] | collectors |
Returns
Type | Description |
---|---|
ICollector |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | if either 0 collectors were input, or all collectors are
|