org.apache.lucene.search
Class ReqExclScorer
public class ReqExclScorer
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.
int | doc()
|
Explanation | explain(int doc)
|
boolean | next()
|
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.
|
ReqExclScorer
public ReqExclScorer(Scorer reqScorer,
Scorer exclScorer)
Construct a ReqExclScorer
.
reqScorer
- The scorer that must match, except whereexclScorer
- indicates exclusion.
next
public boolean next()
throws IOException
- next in interface Scorer
score
public float score()
throws IOException
Returns the score of the current document matching the query.
Initially invalid, until
next()
is called the first time.
- score in interface Scorer
- The score of the required scorer.
skipTo
public boolean skipTo(int target)
throws 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.
- skipTo in interface Scorer
target
- The target document number.
- true iff there is such a match.
Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.