Class TermIntervalsSource

    • Field Detail

      • TERM_OPS_PER_POS

        private static final int TERM_OPS_PER_POS
        Number of simple operations in Lucene99PostingsReader.EverythingEnum#nextPosition() when no seek or buffer refill is done.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TermIntervalsSource

        TermIntervalsSource​(BytesRef term)
    • Method Detail

      • matches

        public IntervalMatchesIterator matches​(java.lang.String field,
                                               LeafReaderContext ctx,
                                               int doc)
                                        throws java.io.IOException
        Description copied from class: IntervalsSource
        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

        Specified by:
        matches in class IntervalsSource
        Parameters:
        field - the field to read positions from
        ctx - the document's context
        doc - the document to return matches for
        Throws:
        java.io.IOException
      • minExtent

        public int minExtent()
        Description copied from class: IntervalsSource
        Return the minimum possible width of an interval returned by this source
        Specified by:
        minExtent in class IntervalsSource
      • pullUpDisjunctions

        public java.util.Collection<IntervalsSource> pullUpDisjunctions()
        Description copied from class: IntervalsSource
        Expert: return the set of disjunctions that make up this IntervalsSource

        Most implementations can return Collections.singleton(this)

        Specified by:
        pullUpDisjunctions in class IntervalsSource
      • termPositionsCost

        static float termPositionsCost​(TermsEnum termsEnum)
                                throws java.io.IOException
        Returns an expected cost in simple operations of processing the occurrences of a term in a document that contains the term. This is for use by TwoPhaseIterator.matchCost() implementations.
        Parameters:
        termsEnum - The term is the term at which this TermsEnum is positioned.
        Throws:
        java.io.IOException