mirror of https://github.com/apache/lucene.git
SOLR-5690: Fix NPE in AbstractStatsValues.accumulate with docValues and docs with empty field
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1565106 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
95610a8c58
commit
462131403a
|
@ -100,7 +100,7 @@ New Features
|
|||
* SOLR-5208: Support for the setting of core.properties key/values at create-time on
|
||||
Collections API (Erick Erickson)
|
||||
|
||||
* SOLR-5428: New 'stats.calcdistinct' parameter in StatsComponent returns
|
||||
* SOLR-5428: SOLR-5690: New 'stats.calcdistinct' parameter in StatsComponent returns
|
||||
set of distinct values and their count. This can also be specified per field
|
||||
e.g. 'f.field.stats.calcdistinct'. (Elran Dvir via shalin)
|
||||
|
||||
|
|
|
@ -494,7 +494,11 @@ class StringStatsValues extends AbstractStatsValues<String> {
|
|||
@Override
|
||||
public void accumulate(int docID) {
|
||||
if (values.exists(docID)) {
|
||||
accumulate(values.strVal(docID), 1);
|
||||
String value = values.strVal(docID);
|
||||
if (value != null)
|
||||
accumulate(value, 1);
|
||||
else
|
||||
missing();
|
||||
} else {
|
||||
missing();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue