SOLR-2085: Improve SolrJ behavior when FacetComponent comes before QueryComponent

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1064386 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2011-01-28 00:34:40 +00:00
parent 261a161c29
commit e70311f386
2 changed files with 7 additions and 1 deletions

View File

@ -166,6 +166,10 @@ Bug Fixes
* SOLR-2320: Fixed ReplicationHandler detail reporting for masters
(hossman)
* SOLR-2085: Improve SolrJ behavior when FacetComponent comes before
QueryComponent (Tomas Salfischberger via hossman)
Other Changes
----------------------

View File

@ -105,7 +105,8 @@ public class QueryResponse extends SolrResponseBase
}
else if( "facet_counts".equals( n ) ) {
_facetInfo = (NamedList<Object>) res.getVal( i );
extractFacetInfo( _facetInfo );
// extractFacetInfo inspects _results, so defer calling it
// in case it hasn't been populated yet.
}
else if( "debug".equals( n ) ) {
_debugInfo = (NamedList<Object>) res.getVal( i );
@ -128,6 +129,7 @@ public class QueryResponse extends SolrResponseBase
extractTermsInfo( _termsInfo );
}
}
if(_facetInfo != null) extractFacetInfo( _facetInfo );
}
private void extractSpellCheckInfo(NamedList<NamedList<Object>> spellInfo) {