manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1841853 - /manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/ModifiedHttpSolrClient.java
Date Mon, 24 Sep 2018 14:16:23 GMT
Author: kwright
Date: Mon Sep 24 14:16:22 2018
New Revision: 1841853

URL: http://svn.apache.org/viewvc?rev=1841853&view=rev
Log:
Yet another fix for CONNECTORS-1533.  This should be a true fix, albeit a hack.

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=1841853&r1=1841852&r2=1841853&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
Mon Sep 24 14:16:22 2018
@@ -168,10 +168,11 @@ public class ModifiedHttpSolrClient exte
     if (SolrRequest.METHOD.POST == request.getMethod() || SolrRequest.METHOD.PUT == request.getMethod())
{
       
       // Hack to allow short queries to go one way, and long queries to go another.
-      final boolean mustUseMultipart = this.useMultiPartPost && request instanceof
org.apache.solr.client.solrj.request.ContentStreamUpdateRequest;
+      final Collection<ContentStream> requestStreams = (requestWriter instanceof org.apache.solr.client.solrj.impl.BinaryRequestWriter)?null:requestWriter.getContentStreams(request);
+      final boolean mustUseMultipart = this.useMultiPartPost && requestStreams !=
null && requestStreams.size() > 0; //request instanceof org.apache.solr.client.solrj.request.ContentStreamUpdateRequest;
       if (mustUseMultipart) {
         //System.out.println("Overriding with streams");
-        streams = requestWriter.getContentStreams(request);
+        streams = requestStreams;
       }
 
       //System.out.println("Post or put");



Mime
View raw message