mirror of https://github.com/apache/lucene.git
LUCENE-2839: Scorer#score(Collector,int,int) is now public because it is called from other classes and part of public API
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1057010 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
821e52604c
commit
a04ade4448
|
@ -132,6 +132,9 @@ Changes in backwards compatibility policy
|
|||
operate on a ReaderContext instead of directly on IndexReader to enable
|
||||
searches to be aware of IndexSearcher's context. (Simon Willnauer)
|
||||
|
||||
* LUCENE-2839: Scorer#score(Collector,int,int) is now public because it is
|
||||
called from other classes and part of public API. (Uwe Schindler)
|
||||
|
||||
Changes in Runtime Behavior
|
||||
|
||||
* LUCENE-2650, LUCENE-2825: The behavior of FSDirectory.open has changed. On 64-bit
|
||||
|
|
|
@ -229,7 +229,7 @@ final class BooleanScorer extends Scorer {
|
|||
|
||||
// firstDocID is ignored since nextDoc() initializes 'current'
|
||||
@Override
|
||||
protected boolean score(Collector collector, int max, int firstDocID) throws IOException {
|
||||
public boolean score(Collector collector, int max, int firstDocID) throws IOException {
|
||||
boolean more;
|
||||
Bucket tmp;
|
||||
BucketScorer bs = new BucketScorer();
|
||||
|
|
|
@ -280,7 +280,7 @@ class BooleanScorer2 extends Scorer {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected boolean score(Collector collector, int max, int firstDocID) throws IOException {
|
||||
public boolean score(Collector collector, int max, int firstDocID) throws IOException {
|
||||
doc = firstDocID;
|
||||
collector.setScorer(this);
|
||||
while (doc < max) {
|
||||
|
|
|
@ -244,10 +244,8 @@ public class ConstantScoreQuery extends Query {
|
|||
}
|
||||
|
||||
// this optimization allows out of order scoring as top scorer,
|
||||
// TODO: theoretically this method should not be called because its protected and
|
||||
// this class does not use it, it should be public in Scorer!
|
||||
@Override
|
||||
protected boolean score(Collector collector, int max, int firstDocID) throws IOException {
|
||||
public boolean score(Collector collector, int max, int firstDocID) throws IOException {
|
||||
if (docIdSetIterator instanceof Scorer) {
|
||||
return ((Scorer) docIdSetIterator).score(wrapCollector(collector), max, firstDocID);
|
||||
} else {
|
||||
|
|
|
@ -123,7 +123,7 @@ class DisjunctionSumScorer extends Scorer {
|
|||
* @return true if more matching documents may remain.
|
||||
*/
|
||||
@Override
|
||||
protected boolean score(Collector collector, int max, int firstDocID) throws IOException {
|
||||
public boolean score(Collector collector, int max, int firstDocID) throws IOException {
|
||||
// firstDocID is ignored since nextDoc() sets 'currentDoc'
|
||||
collector.setScorer(this);
|
||||
while (currentDoc < max) {
|
||||
|
|
|
@ -43,7 +43,7 @@ public class ScoreCachingWrappingScorer extends Scorer {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected boolean score(Collector collector, int max, int firstDocID) throws IOException {
|
||||
public boolean score(Collector collector, int max, int firstDocID) throws IOException {
|
||||
return scorer.score(collector, max, firstDocID);
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ public abstract class Scorer extends DocIdSetIterator {
|
|||
* this method.
|
||||
* @return true if more matching documents may remain.
|
||||
*/
|
||||
protected boolean score(Collector collector, int max, int firstDocID) throws IOException {
|
||||
public boolean score(Collector collector, int max, int firstDocID) throws IOException {
|
||||
collector.setScorer(this);
|
||||
int doc = firstDocID;
|
||||
while (doc < max) {
|
||||
|
|
|
@ -77,7 +77,7 @@ final class TermScorer extends Scorer {
|
|||
|
||||
// firstDocID is ignored since nextDoc() sets 'doc'
|
||||
@Override
|
||||
protected boolean score(Collector c, int end, int firstDocID) throws IOException {
|
||||
public boolean score(Collector c, int end, int firstDocID) throws IOException {
|
||||
c.setScorer(this);
|
||||
while (doc < end) { // for docs in window
|
||||
c.collect(doc); // collect score
|
||||
|
|
|
@ -215,7 +215,7 @@ final class JustCompileSearch {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected boolean score(Collector collector, int max, int firstDocID)
|
||||
public boolean score(Collector collector, int max, int firstDocID)
|
||||
throws IOException {
|
||||
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue