mirror of https://github.com/apache/lucene.git
DrillSidewaysScorer NPE if drill-down terms were not found
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1491809 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a287431293
commit
5a14c04bc1
|
@ -80,9 +80,11 @@ class DrillSidewaysScorer extends Scorer {
|
|||
// Position all scorers to their first matching doc:
|
||||
baseScorer.nextDoc();
|
||||
for(DocsEnumsAndFreq dim : dims) {
|
||||
for(DocsEnum docsEnum : dim.docsEnums) {
|
||||
if (docsEnum != null) {
|
||||
docsEnum.nextDoc();
|
||||
if (dim.docsEnums != null) {
|
||||
for (DocsEnum docsEnum : dim.docsEnums) {
|
||||
if (docsEnum != null) {
|
||||
docsEnum.nextDoc();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -95,9 +97,11 @@ class DrillSidewaysScorer extends Scorer {
|
|||
for(int dim=0;dim<numDims;dim++) {
|
||||
docsEnums[dim] = dims[dim].docsEnums;
|
||||
sidewaysCollectors[dim] = dims[dim].sidewaysCollector;
|
||||
for(DocsEnum de : dims[dim].docsEnums) {
|
||||
if (de != null) {
|
||||
drillDownCost += de.cost();
|
||||
if (dims[dim].docsEnums != null) {
|
||||
for (DocsEnum de : dims[dim].docsEnums) {
|
||||
if (de != null) {
|
||||
drillDownCost += de.cost();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue