Class PhraseMatcher

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private float matchCost  
    • Constructor Summary

      Constructors 
      Constructor Description
      PhraseMatcher​(float matchCost)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) abstract DocIdSetIterator approximation()
      Approximation that only matches documents that have all terms.
      (package private) abstract int endOffset()
      The end offset of the current match
      (package private) abstract int endPosition()
      The end position of the current match
      float getMatchCost()
      An estimate of the average cost of finding all matches on a document
      (package private) abstract ImpactsDISI impactsApproximation()
      Approximation that is aware of impacts.
      (package private) abstract float maxFreq()
      An upper bound on the number of possible matches on this document
      abstract boolean nextMatch()
      Find the next match on the current document, returning false if there are none.
      abstract void reset()
      Called after approximation() has been advanced
      (package private) abstract float sloppyWeight()
      The slop-adjusted weight of the current match The sum of the slop-adjusted weights is used as the freq for scoring
      (package private) abstract int startOffset()
      The start offset of the current match
      (package private) abstract int startPosition()
      The start position of the current match
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • matchCost

        private final float matchCost
    • Constructor Detail

      • PhraseMatcher

        PhraseMatcher​(float matchCost)
    • Method Detail

      • approximation

        abstract DocIdSetIterator approximation()
        Approximation that only matches documents that have all terms.
      • impactsApproximation

        abstract ImpactsDISI impactsApproximation()
        Approximation that is aware of impacts.
      • maxFreq

        abstract float maxFreq()
                        throws java.io.IOException
        An upper bound on the number of possible matches on this document
        Throws:
        java.io.IOException
      • reset

        public abstract void reset()
                            throws java.io.IOException
        Called after approximation() has been advanced
        Throws:
        java.io.IOException
      • nextMatch

        public abstract boolean nextMatch()
                                   throws java.io.IOException
        Find the next match on the current document, returning false if there are none.
        Throws:
        java.io.IOException
      • sloppyWeight

        abstract float sloppyWeight()
        The slop-adjusted weight of the current match The sum of the slop-adjusted weights is used as the freq for scoring
      • startPosition

        abstract int startPosition()
        The start position of the current match
      • endPosition

        abstract int endPosition()
        The end position of the current match
      • startOffset

        abstract int startOffset()
                          throws java.io.IOException
        The start offset of the current match
        Throws:
        java.io.IOException
      • endOffset

        abstract int endOffset()
                        throws java.io.IOException
        The end offset of the current match
        Throws:
        java.io.IOException
      • getMatchCost

        public float getMatchCost()
        An estimate of the average cost of finding all matches on a document
        See Also:
        TwoPhaseIterator.matchCost()