disambiguate inner class call to doc() for ecj compilation: LUCENE-610

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@416111 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2006-06-21 21:11:53 +00:00
parent e2c8931219
commit 9c011b1b33
2 changed files with 10 additions and 6 deletions

View File

@ -56,6 +56,10 @@ Bug fixes
a non-empty segment file to be re-used, causing index corruption. a non-empty segment file to be re-used, causing index corruption.
(Andy Hind via Yonik Seeley) (Andy Hind via Yonik Seeley)
10. LUCENE-610: Simple syntax change to allow compilation with ecj :
disambiguate inner class scorer's use of doc() in BooleanScorer2.
(DM Smith via Yonik Seeley)
Optimizations Optimizations
1. LUCENE-586: TermDocs.skipTo() is now more efficient for multi-segment 1. LUCENE-586: TermDocs.skipTo() is now more efficient for multi-segment

View File

@ -130,8 +130,8 @@ class BooleanScorer2 extends Scorer {
this.scorer = scorer; this.scorer = scorer;
} }
public float score() throws IOException { public float score() throws IOException {
if (doc() > lastScoredDoc) { if (this.doc() > lastScoredDoc) {
lastScoredDoc = doc(); lastScoredDoc = this.doc();
coordinator.nrMatchers++; coordinator.nrMatchers++;
} }
return scorer.score(); return scorer.score();
@ -157,8 +157,8 @@ class BooleanScorer2 extends Scorer {
return new DisjunctionSumScorer(scorers, minMrShouldMatch) { return new DisjunctionSumScorer(scorers, minMrShouldMatch) {
private int lastScoredDoc = -1; private int lastScoredDoc = -1;
public float score() throws IOException { public float score() throws IOException {
if (doc() > lastScoredDoc) { if (this.doc() > lastScoredDoc) {
lastScoredDoc = doc(); lastScoredDoc = this.doc();
coordinator.nrMatchers += super.nrMatchers; coordinator.nrMatchers += super.nrMatchers;
} }
return super.score(); return super.score();
@ -175,8 +175,8 @@ class BooleanScorer2 extends Scorer {
private int lastScoredDoc = -1; private int lastScoredDoc = -1;
public float score() throws IOException { public float score() throws IOException {
if (doc() > lastScoredDoc) { if (this.doc() > lastScoredDoc) {
lastScoredDoc = doc(); lastScoredDoc = this.doc();
coordinator.nrMatchers += requiredNrMatchers; coordinator.nrMatchers += requiredNrMatchers;
} }
// All scorers match, so defaultSimilarity super.score() always has 1 as // All scorers match, so defaultSimilarity super.score() always has 1 as