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:
Koji Sekiguchi 2010-02-05 02:49:48 +00:00
parent 8d22659b57
commit 000500e3e4
2 changed files with 5 additions and 2 deletions

View File

@ -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
----------------------

View File

@ -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 ) );
}
}
}