mirror of https://github.com/apache/lucene.git
SOLR-1753: StatsComponent throws NPE when getting statistics for facets in distributed search
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@906781 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8d22659b57
commit
000500e3e4
|
@ -170,6 +170,9 @@ Bug Fixes
|
|||
in file descriptor leaks.
|
||||
(Christoff Brill, Mark Miller)
|
||||
|
||||
* SOLR-1753: StatsComponent throws NPE when getting statistics for facets in distributed search
|
||||
(Janne Majaranta via koji)
|
||||
|
||||
Other Changes
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -73,13 +73,13 @@ public class StatsValues {
|
|||
facets.put( field, addTo );
|
||||
}
|
||||
for( int j=0; j< vals.size(); j++ ) {
|
||||
String val = f.getName(i);
|
||||
String val = vals.getName(j);
|
||||
StatsValues vvals = addTo.get( val );
|
||||
if( vvals == null ) {
|
||||
vvals = new StatsValues();
|
||||
addTo.put( val, vvals );
|
||||
}
|
||||
vvals.accumulate( (NamedList)f.getVal( i ) );
|
||||
vvals.accumulate( (NamedList)vals.getVal( j ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue