Class IntervalsSource

    • Constructor Detail

      • IntervalsSource

        public IntervalsSource()
    • Method Detail

      • intervals

        public abstract IntervalIterator intervals​(java.lang.String field,
                                                   LeafReaderContext ctx)
                                            throws java.io.IOException
        Create an IntervalIterator exposing the minimum intervals defined by this IntervalsSource Returns null if no intervals for this field exist in this segment
        Parameters:
        field - the field to read positions from
        ctx - the context for which to return the iterator
        Throws:
        java.io.IOException
      • matches

        public abstract MatchesIterator matches​(java.lang.String field,
                                                LeafReaderContext ctx,
                                                int doc)
                                         throws java.io.IOException
        Return a MatchesIterator over the intervals defined by this IntervalsSource for a given document and field Returns null if no intervals exist in the given document and field
        Parameters:
        field - the field to read positions from
        ctx - the document's context
        doc - the document to return matches for
        Throws:
        java.io.IOException
      • visit

        public abstract void visit​(java.lang.String field,
                                   QueryVisitor visitor)
        Expert: visit the tree of sources
      • minExtent

        public abstract int minExtent()
        Return the minimum possible width of an interval returned by this source
      • pullUpDisjunctions

        public abstract java.util.Collection<IntervalsSource> pullUpDisjunctions()
        Expert: return the set of disjunctions that make up this IntervalsSource Most implementations can return Collections.singleton(this)
      • hashCode

        public abstract int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public abstract boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • toString

        public abstract java.lang.String toString()
        Overrides:
        toString in class java.lang.Object