You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/01/08 16:34:26 UTC

[GitHub] [lucene-solr] thelabdude commented on a change in pull request #2132: SOLR-15036: auto- select / rollup / sort / plist over facet expression when using a collection alias with multiple collections

thelabdude commented on a change in pull request #2132:
URL: https://github.com/apache/lucene-solr/pull/2132#discussion_r554052572



##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/DrillStream.java
##########
@@ -252,29 +253,27 @@ public void setStreamContext(StreamContext streamContext) {
   }
 
   protected void constructStreams() throws IOException {
-
     try {
-
       Object pushStream = ((Expressible) tupleStream).toExpression(streamFactory);
-
-      List<String> shardUrls = getShards(this.zkHost, this.collection, this.streamContext);
-
-      for(int w=0; w<shardUrls.size(); w++) {
-        ModifiableSolrParams paramsLoc = new ModifiableSolrParams();
-        paramsLoc.set(DISTRIB,"false"); // We are the aggregator.
-        paramsLoc.set("expr", pushStream.toString());
-        paramsLoc.set("qt","/export");
-        paramsLoc.set("fl", fl);
-        paramsLoc.set("sort", sort);
-        paramsLoc.set("q", q);
-        String url = shardUrls.get(w);
-        SolrStream solrStream = new SolrStream(url, paramsLoc);
+      final ModifiableSolrParams paramsLoc = new ModifiableSolrParams();
+      paramsLoc.set(DISTRIB,"false"); // We are the aggregator.
+      paramsLoc.set("expr", pushStream.toString());
+      paramsLoc.set("qt","/export");
+      paramsLoc.set("fl", fl);
+      paramsLoc.set("sort", sort);
+      paramsLoc.set("q", q);
+      getReplicas(this.zkHost, this.collection, this.streamContext, paramsLoc).forEach(r -> {

Review comment:
       This refactor makes use of the enhancement provided by SOLR-14987 to reuse HttpSolrClients per host vs. one per replica




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org