org.apache.lucene.search
Class ReqExclScorer
- java.lang.Object
-
- org.apache.lucene.search.Scorer
-
- org.apache.lucene.search.ReqExclScorer
-
public class ReqExclScorer extends Scorer
A Scorer for queries with a required subscorer and an excluding (prohibited) subscorer.
ThisScorerimplementsScorer.skipTo(int), and it uses the skipTo() on the given scorers.
-
-
Constructor Summary
Constructors Constructor and Description ReqExclScorer(Scorer reqScorer, Scorer exclScorer)Construct aReqExclScorer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intdoc()Returns the current document number matching the query.Explanationexplain(int doc)Returns an explanation of the score for a document.booleannext()Advances to the document matching this Scorer with the lowest doc Id greater than the current value ofScorer.doc()(or to the matching document with the lowest doc Id if next has never been called on this Scorer).floatscore()Returns the score of the current document matching the query.booleanskipTo(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 org.apache.lucene.search.Scorer
getSimilarity, score
-
-
-
-
Method Detail
-
next
public boolean next() throws java.io.IOExceptionDescription copied from class:ScorerAdvances to the document matching this Scorer with the lowest doc Id greater than the current value ofScorer.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:
nextin classScorer- 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:ScorerReturns the current document number matching the query. Initially invalid, untilScorer.next()is called the first time.
-
score
public float score() throws java.io.IOExceptionReturns the score of the current document matching the query. Initially invalid, untilnext()is called the first time.
-
skipTo
public boolean skipTo(int target) throws java.io.IOExceptionSkips to the first match beyond the current whose document number is greater than or equal to a given target.
When this method is used theexplain(int)method should not be used.- Specified by:
skipToin classScorer- Parameters:
target- The target document number.- Returns:
- true iff there is such a match.
- Throws:
java.io.IOException- See Also:
BooleanQuery.setAllowDocsOutOfOrder(boolean)
-
explain
public Explanation explain(int doc) throws java.io.IOException
Description copied from class:ScorerReturns an explanation of the score for a document.
When this method is used, theScorer.next(),Scorer.skipTo(int)andScorer.score(HitCollector)methods should not be used.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG