[ https://issues.apache.org/jira/browse/SOLR-1021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hoss Man updated SOLR-1021: --------------------------- Fix Version/s: 1.4 Summary: NullPointerException(s) in SolrJ when using stats and result set is empty (was: NullPointerException in FieldStatsInfo) The bug with stats makes sense -- the question is what behavior would be better for clients: 1) leave the _fieldStatsInfo Map empty 2) populate _fieldStatsInfo with all of the fields that were returned as keys, but null for hte values 3) populate _fieldStatsInfo with "empty" FieldStatsInfo objects (so all the accessors -- ie: FieldStatsInfo.getCount() -- return null) #2 & #3 being alternate methods for conveying to clients which fields they would have gotten stats for if the result set hadn't been empty. any of these approaches is relatively trivial to implement, it's just a question of which will be the best for clients. I don't really understand the change to extractFacetInfo in the patch. even with an empty result set, the facet_query NamedList will never contain a null value -- they will all be zeros. ... can someone post a stack trace (and explanation of what the request looked like) where the current code caused a problem? > NullPointerException(s) in SolrJ when using stats and result set is empty > ------------------------------------------------------------------------- > > Key: SOLR-1021 > URL: https://issues.apache.org/jira/browse/SOLR-1021 > Project: Solr > Issue Type: Bug > Components: clients - java > Affects Versions: 1.4 > Environment: Tomcat 6, Windows > Reporter: Arie Fishler > Priority: Minor > Fix For: 1.4 > > Attachments: QueryResponse.java, SOLR-1021.patch > > > A NullPointerException is thrown at line 51 of class FieldStatsInfo since the > returned stats information for the fname (ctor variable) is null and not > checked for being so. > Seems like this occurs when the search returns with no results but there were > some setGetFieldStatistics defined for some fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.