manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1644922 - in /manifoldcf/branches/release-2.0-branch: ./ connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/
Date Fri, 12 Dec 2014 15:04:02 GMT
Author: kwright
Date: Fri Dec 12 15:04:02 2014
New Revision: 1644922

URL: http://svn.apache.org/r1644922
Log:
Fix for CONNECTORS-1120, from trunk

Modified:
    manifoldcf/branches/release-2.0-branch/   (props changed)
    manifoldcf/branches/release-2.0-branch/CHANGES.txt
    manifoldcf/branches/release-2.0-branch/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnection.java
    manifoldcf/branches/release-2.0-branch/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchDelete.java

Propchange: manifoldcf/branches/release-2.0-branch/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 12 15:04:02 2014
@@ -119,4 +119,4 @@
 /manifoldcf/branches/CONNECTORS-981:1605049-1605773
 /manifoldcf/branches/CONNECTORS-989:1611600-1612101
 /manifoldcf/branches/CONNECTORS-990:1610284-1610707
-/manifoldcf/trunk:1644252,1644399,1644538
+/manifoldcf/trunk:1644252,1644399,1644538,1644920

Modified: manifoldcf/branches/release-2.0-branch/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-2.0-branch/CHANGES.txt?rev=1644922&r1=1644921&r2=1644922&view=diff
==============================================================================
--- manifoldcf/branches/release-2.0-branch/CHANGES.txt (original)
+++ manifoldcf/branches/release-2.0-branch/CHANGES.txt Fri Dec 12 15:04:02 2014
@@ -3,6 +3,10 @@ $Id$
 
 ======================= Release 2.0 =====================
 
+CONNECTORS-1120: ElasticSearch: Handle case of deleting already
+deleted document.
+(Kamil Żyta, Karl Wright)
+
 CONNECTORS-1118: Change IIncrementalIngester interface to allow
 for cached connection instances.
 (Aeham Abushwashi, Karl Wright)

Modified: manifoldcf/branches/release-2.0-branch/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnection.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-2.0-branch/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnection.java?rev=1644922&r1=1644921&r2=1644922&view=diff
==============================================================================
--- manifoldcf/branches/release-2.0-branch/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnection.java
(original)
+++ manifoldcf/branches/release-2.0-branch/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnection.java
Fri Dec 12 15:04:02 2014
@@ -224,7 +224,7 @@ public class ElasticSearchConnection
     }
   }
 
-  private boolean handleResultCode(int code, String response)
+  protected boolean handleResultCode(int code, String response)
     throws ManifoldCFException, ServiceInterruption
   {
     if (code == 200 || code == 201)

Modified: manifoldcf/branches/release-2.0-branch/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchDelete.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-2.0-branch/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchDelete.java?rev=1644922&r1=1644921&r2=1644922&view=diff
==============================================================================
--- manifoldcf/branches/release-2.0-branch/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchDelete.java
(original)
+++ manifoldcf/branches/release-2.0-branch/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchDelete.java
Fri Dec 12 15:04:02 2014
@@ -52,4 +52,17 @@ public class ElasticSearchDelete extends
       setResult("JSONERROR",Result.ERROR, error);
       Logging.connectors.warn("ES: Delete failed: "+getResponse());
   }
+  
+  @Override
+  protected boolean handleResultCode(int code, String response)
+    throws ManifoldCFException, ServiceInterruption
+  {
+    if (code == 404)
+    {
+      setResult("OK",Result.OK, null);
+      return true;
+    }
+    return super.handleResultCode(code, response);
+  }
+
 }



Mime
View raw message