mirror of https://github.com/apache/lucene.git
SOLR-5408 Fixed issue with scorer
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1541232 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
04493c01d6
commit
3835bff32d
|
@ -317,6 +317,7 @@ public class CollapsingQParserPlugin extends QParserPlugin {
|
|||
private class DummyScorer extends Scorer {
|
||||
|
||||
public float score;
|
||||
public int docId;
|
||||
|
||||
public DummyScorer() {
|
||||
super(null);
|
||||
|
@ -339,7 +340,7 @@ public class CollapsingQParserPlugin extends QParserPlugin {
|
|||
}
|
||||
|
||||
public int docID() {
|
||||
return 0;
|
||||
return docId;
|
||||
}
|
||||
|
||||
public long cost() {
|
||||
|
@ -474,6 +475,7 @@ public class CollapsingQParserPlugin extends QParserPlugin {
|
|||
}
|
||||
|
||||
int contextDoc = docId-currentDocBase;
|
||||
dummy.docId = contextDoc;
|
||||
delegate.collect(contextDoc);
|
||||
}
|
||||
|
||||
|
@ -587,6 +589,7 @@ public class CollapsingQParserPlugin extends QParserPlugin {
|
|||
}
|
||||
|
||||
int contextDoc = docId-currentDocBase;
|
||||
dummy.docId = contextDoc;
|
||||
delegate.collect(contextDoc);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue