lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r932821 - /lucene/solr/branches/cloud/src/java/org/apache/solr/handler/component/TermsComponent.java
Date Sun, 11 Apr 2010 01:03:19 GMT
Author: yonik
Date: Sun Apr 11 01:03:19 2010
New Revision: 932821

URL: http://svn.apache.org/viewvc?rev=932821&view=rev
Log:
terms component needs to set rb.isDistrib for distributed operation

Modified:
    lucene/solr/branches/cloud/src/java/org/apache/solr/handler/component/TermsComponent.java

Modified: lucene/solr/branches/cloud/src/java/org/apache/solr/handler/component/TermsComponent.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/java/org/apache/solr/handler/component/TermsComponent.java?rev=932821&r1=932820&r2=932821&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/java/org/apache/solr/handler/component/TermsComponent.java
(original)
+++ lucene/solr/branches/cloud/src/java/org/apache/solr/handler/component/TermsComponent.java
Sun Apr 11 01:03:19 2010
@@ -58,6 +58,7 @@ public class TermsComponent extends Sear
     // TODO: temporary... this should go in a different component.
     String shards = params.get(ShardParams.SHARDS);
     if (shards != null) {
+      rb.isDistrib = true;
       if (params.get(ShardParams.SHARDS_QT) == null) {
         throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "No shards.qt parameter
specified");
       }
@@ -250,9 +251,6 @@ public class TermsComponent extends Sear
     // base shard request on original parameters
     sreq.params = new ModifiableSolrParams(params);
 
-    // don't pass through the shards param
-    sreq.params.remove(ShardParams.SHARDS);
-
     // remove any limits for shards, we want them to return all possible
     // responses
     // we want this so we can calculate the correct counts
@@ -262,11 +260,6 @@ public class TermsComponent extends Sear
     sreq.params.set(TermsParams.TERMS_LIMIT, -1);
     sreq.params.set(TermsParams.TERMS_SORT, TermsParams.TERMS_SORT_INDEX);
 
-    // TODO: is there a better way to handle this?
-    String qt = params.get(CommonParams.QT);
-    if (qt != null) {
-      sreq.params.add(CommonParams.QT, qt);
-    }
     return sreq;
   }
 



Mime
View raw message