The main raison d'être of this class is support for query expansion: a blind application
of
OrDocumentIterator to an array of index iterators would mislead scorers such as
BM25Scorer because low-frequency terms (e.g., hapax legomena) would be responsible for most of the score.
getInstance(IndexIterator... indexIterator) Returns an index iterator that merges the given array of iterators.
This method requires that at least one iterator is provided.
getInstance(int defaultFrequency, IndexIterator... indexIterator) Returns an index iterator that merges the given array of iterators.
This method requires that at least one iterator is provided.
Parameters: defaultFrequency - the default term frequency (or Integer.MIN_VALUE for the max). Parameters: indexIterator - the iterators to be joined (at least one).
Creates a new document iterator that merges the given array of iterators.
Parameters: defaultFrequency - the default term frequency (or Integer.MIN_VALUE for the max). Parameters: indexIterator - the iterators to be joined.
Returns an index iterator that merges the given array of iterators.
This method requires that at least one iterator is provided. The frequency is computed as a max,
and
MultiTermIndexIterator.index() will return the result of the same method on the first iterator.
Parameters: indexIterator - the iterators to be joined (at least one). a merged index iterator. throws: IllegalArgumentException - if no iterators were provided.
Returns an index iterator that merges the given array of iterators.
Note that the special case of the empty and of the singleton arrays
are handled efficiently. The frequency is computed as a max, and
MultiTermIndexIterator.index() will return index.
Parameters: index - the index that wil be returned by MultiTermIndexIterator.index(). Parameters: indexIterator - the iterators to be joined. a merged index iterator.
Returns an index iterator that merges the given array of iterators.
This method requires that at least one iterator is provided.
Parameters: defaultFrequency - the default term frequency (or Integer.MIN_VALUE for the max). Parameters: indexIterator - the iterators to be joined (at least one). a merged index iterator. throws: IllegalArgumentException - if no iterators were provided, or they run on different indices.
Returns an index iterator that merges the given array of iterators.
Note that the special case of the empty and of the singleton arrays
are handled efficiently.
Parameters: defaultFrequency - the default term frequency (or Integer.MIN_VALUE for the max). Parameters: index - the index that wil be returned by MultiTermIndexIterator.index(). Parameters: indexIterator - the iterators to be joined. a merged index iterator. throws: IllegalArgumentException - if there is some iterator on an index different from index.