manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1841618 - /manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/ModifiedHttpSolrClient.java
Date Fri, 21 Sep 2018 17:28:44 GMT
Author: kwright
Date: Fri Sep 21 17:28:44 2018
New Revision: 1841618

URL: http://svn.apache.org/viewvc?rev=1841618&view=rev
Log:
More attempts at a fix for CONNECTORS-1533.

Modified:
    manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/ModifiedHttpSolrClient.java

Modified: manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/ModifiedHttpSolrClient.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/ModifiedHttpSolrClient.java?rev=1841618&r1=1841617&r2=1841618&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/ModifiedHttpSolrClient.java
(original)
+++ manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/ModifiedHttpSolrClient.java
Fri Sep 21 17:28:44 2018
@@ -147,8 +147,7 @@ public class ModifiedHttpSolrClient exte
       String url = basePath + path;
       
       // Hack to allow short queries to go one way, and long queries to go another.
-      final String wQueryString = toQueryString(wparams, false);
-      final boolean mustUseMultipart = url.length() + wQueryString.length() > 4000;
+      final boolean mustUseMultipart = request instanceof org.apache.solr.client.solrj.request.ContentStreamUpdateRequest;
       if (mustUseMultipart) {
         streams = requestWriter.getContentStreams(request);
       }
@@ -166,8 +165,8 @@ public class ModifiedHttpSolrClient exte
           || (streams != null && streams.size() > 1)) && !hasNullStreamName;
 
       LinkedList<NameValuePair> postOrPutParams = new LinkedList<>();
-      if(contentWriter != null && !mustUseMultipart) {
-        String fullQueryUrl = url + wQueryString;
+      if(contentWriter != null && !isMultipart) {
+        String fullQueryUrl = url + toQueryString(wparams, false);
         HttpEntityEnclosingRequestBase postOrPut = SolrRequest.METHOD.POST == request.getMethod()
?
             new HttpPost(fullQueryUrl) : new HttpPut(fullQueryUrl);
         postOrPut.addHeader("Content-Type",



Mime
View raw message