Class TrueDocumentIterator

    • Constructor Detail

      • TrueDocumentIterator

        protected TrueDocumentIterator​(Index index)
    • Method Detail

      • getInstance

        public static TrueDocumentIterator getInstance​(Index index)
        Creates a true document iterator with given index.
        Parameters:
        index - the index of this iterator.
        Returns:
        a true document iterator with given index.
      • intervalIterator

        public IntervalIterator intervalIterator()
        Description copied from interface: DocumentIterator
        Returns the interval iterator of this document iterator for single-index queries.

        This is a commodity method that can be used only for queries built over a single index.

        Returns:
        an interval iterator.
        See Also:
        DocumentIterator.intervalIterator(Index)
      • intervalIterator

        public IntervalIterator intervalIterator​(Index index)
        Description copied from interface: DocumentIterator
        Returns the interval iterator of this document iterator for the given index.

        After a call to DocumentIterator.nextDocument(), this iterator can be used to retrieve the intervals in the current document (the one returned by DocumentIterator.nextDocument()) for the index index.

        Note that if all indices have positions, it is guaranteed that at least one index will return an interval. However, for disjunctive queries it cannot be guaranteed that all indices will return an interval.

        Indices without positions always return IntervalIterators.TRUE. Thus, in presence of indices without positions it is possible that no intervals at all are available.

        Parameters:
        index - an index (must be one over which the query was built).
        Returns:
        an interval iterator over the current document in index.
      • indices

        public ReferenceSet<Index> indices()
        Description copied from interface: DocumentIterator
        Returns the set of indices over which this iterator is built.
        Returns:
        the set of indices over which this iterator is built.
      • accept

        public <T> T accept​(DocumentIteratorVisitor<T> visitor)
        Description copied from interface: DocumentIterator
        Accepts a visitor.

        A document iterator is usually structured as composite, with operators as internal nodes and IndexIterators as leaves. This method implements the visitor pattern.

        Parameters:
        visitor - the visitor.
        Returns:
        an object resulting from the visit, or null if the visit was interrupted.
      • dispose

        public void dispose()
        Description copied from interface: DocumentIterator
        Disposes this document iterator, releasing all resources.

        This method should propagate down to the underlying index iterators, where it should release resources such as open files and network connections. If you're doing your own resource tracking and pooling, then you do not need to call this method.