Documentation of 'org.apache.lucene.search.ReqExclScorer' Java class
ReqExclScorer
org.apache.lucene.search

Class ReqExclScorer



  • public class ReqExclScorer
    extends Scorer
    A Scorer for queries with a required subscorer and an excluding (prohibited) subscorer.
    This Scorer implements Scorer.skipTo(int), and it uses the skipTo() on the given scorers.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ReqExclScorer(Scorer reqScorer, Scorer exclScorer)
      Construct a ReqExclScorer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int doc()
      Returns the current document number matching the query.
      Explanation explain(int doc)
      Returns an explanation of the score for a document.
      boolean next()
      Advances to the document matching this Scorer with the lowest doc Id greater than the current value of Scorer.doc() (or to the matching document with the lowest doc Id if next has never been called on this Scorer).
      float score()
      Returns the score of the current document matching the query.
      boolean skipTo(int target)
      Skips to the first match beyond the current whose document number is greater than or equal to a given target.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ReqExclScorer

        public ReqExclScorer(Scorer reqScorer,
                             Scorer exclScorer)
        Construct a ReqExclScorer.
        Parameters:
        reqScorer - The scorer that must match, except where
        exclScorer - indicates exclusion.
    • Method Detail

      • next

        public boolean next()
                     throws java.io.IOException
        Description copied from class: Scorer
        Advances to the document matching this Scorer with the lowest doc Id greater than the current value of Scorer.doc() (or to the matching document with the lowest doc Id if next has never been called on this Scorer).

        When this method is used the Scorer.explain(int) method should not be used.

        Specified by:
        next in class Scorer
        Returns:
        true iff there is another document matching the query.
        Throws:
        java.io.IOException
        See Also:
        BooleanQuery.setAllowDocsOutOfOrder(boolean)
      • doc

        public int doc()
        Description copied from class: Scorer
        Returns the current document number matching the query. Initially invalid, until Scorer.next() is called the first time.
        Specified by:
        doc in class Scorer
      • score

        public float score()
                    throws java.io.IOException
        Returns the score of the current document matching the query. Initially invalid, until next() is called the first time.
        Specified by:
        score in class Scorer
        Returns:
        The score of the required scorer.
        Throws:
        java.io.IOException
      • skipTo

        public boolean skipTo(int target)
                       throws java.io.IOException
        Skips to the first match beyond the current whose document number is greater than or equal to a given target.
        When this method is used the explain(int) method should not be used.
        Specified by:
        skipTo in class Scorer
        Parameters:
        target - The target document number.
        Returns:
        true iff there is such a match.
        Throws:
        java.io.IOException
        See Also:
        BooleanQuery.setAllowDocsOutOfOrder(boolean)

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.