lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hoss...@apache.org
Subject svn commit: r1064386 - in /lucene/dev/trunk/solr: CHANGES.txt src/solrj/org/apache/solr/client/solrj/response/QueryResponse.java
Date Fri, 28 Jan 2011 00:34:40 GMT
Author: hossman
Date: Fri Jan 28 00:34:40 2011
New Revision: 1064386

URL: http://svn.apache.org/viewvc?rev=1064386&view=rev
Log:
SOLR-2085: Improve SolrJ behavior when FacetComponent comes before QueryComponent

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/src/solrj/org/apache/solr/client/solrj/response/QueryResponse.java

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1064386&r1=1064385&r2=1064386&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Fri Jan 28 00:34:40 2011
@@ -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
 ----------------------
 

Modified: lucene/dev/trunk/solr/src/solrj/org/apache/solr/client/solrj/response/QueryResponse.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/solrj/org/apache/solr/client/solrj/response/QueryResponse.java?rev=1064386&r1=1064385&r2=1064386&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/solrj/org/apache/solr/client/solrj/response/QueryResponse.java
(original)
+++ lucene/dev/trunk/solr/src/solrj/org/apache/solr/client/solrj/response/QueryResponse.java
Fri Jan 28 00:34:40 2011
@@ -105,7 +105,8 @@ public class QueryResponse extends SolrR
       }
       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 SolrR
         extractTermsInfo( _termsInfo );
       }
     }
+    if(_facetInfo != null) extractFacetInfo( _facetInfo );
   }
 
   private void extractSpellCheckInfo(NamedList<NamedList<Object>> spellInfo)
{



Mime
View raw message