Class PayloadPredicateDocumentIterator

  • All Implemented Interfaces:
    DocumentIterator

    public class PayloadPredicateDocumentIterator
    extends AbstractDocumentIterator
    implements DocumentIterator
    A document iterator that filters an IndexIterator, returning just documents whose payload satisfies a given predicate. The interval iterators are computed by delegation to the underlying IndexIterator.

    Besides the classic skipTo(long) method, this class provides a skipUnconditionallyTo(long) method that skips to a given document even if the document does not match the predicate. This feature is fundamental to implement an efficient list intersection algorithm, as skipTo(long) is very expensive when the argument does not satisfy the predicate (as the next valid document must be searched for exhaustively).

    Since:
    0.9
    Author:
    Sebastiano Vigna