manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rh...@apache.org
Subject svn commit: r1828427 - in /manifoldcf/trunk/connectors/nuxeo/connector/src: main/java/org/apache/manifoldcf/crawler/connectors/nuxeo/NuxeoRepositoryConnector.java test/java/org/apache/manifoldcf/crawler/connectors/nuxeo/NuxeoConnectorTest.java
Date Thu, 05 Apr 2018 12:52:12 GMT
Author: rharo
Date: Thu Apr  5 12:52:12 2018
New Revision: 1828427

URL: http://svn.apache.org/viewvc?rev=1828427&view=rev
Log:
Nuxeo Connector: Fixed Document Deletion Management

Modified:
    manifoldcf/trunk/connectors/nuxeo/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/nuxeo/NuxeoRepositoryConnector.java
    manifoldcf/trunk/connectors/nuxeo/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/nuxeo/NuxeoConnectorTest.java

Modified: manifoldcf/trunk/connectors/nuxeo/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/nuxeo/NuxeoRepositoryConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/nuxeo/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/nuxeo/NuxeoRepositoryConnector.java?rev=1828427&r1=1828426&r2=1828427&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/nuxeo/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/nuxeo/NuxeoRepositoryConnector.java
(original)
+++ manifoldcf/trunk/connectors/nuxeo/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/nuxeo/NuxeoRepositoryConnector.java
Thu Apr  5 12:52:12 2018
@@ -476,7 +476,7 @@ public class NuxeoRepositoryConnector ex
         }
 
         query = String.format(URI_DOCUMENT + " where ecm:mixinType != 'HiddenInNavigation'
AND ecm:isProxy = 0 " +
-                "AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState != 'deleted'
AND %s ", query);
+                "AND ecm:isCheckedInVersion = 0 AND %s ", query);
 
         Documents docs = nuxeoClient.repository().query(query, String.valueOf(limit), String.valueOf(start),
null, null,
                 null, null);
@@ -511,14 +511,12 @@ public class NuxeoRepositoryConnector ex
                     activities.noDocument(documentId, version);
                     continue;
                 }
-                if (indexed_version != null)
-                    if (!activities.checkDocumentNeedsReindexing(documentId, version))
-                        continue;
 
                 pResult = processDocument(document, documentId, spec, version, indexed_version,
                         activities, Maps.newHashMap());
             } catch (NuxeoClientException exception) {
-                throw new ManifoldCFException("Client exception: "+exception.getMessage(),
exception);
+                logger.info(String.format("Error Fetching Nuxeo Document %s. Marking for
deletion", documentId));
+                activities.deleteDocument(documentId);
             } catch (IOException exception) {
                 long interruptionRetryTime = 5L * 60L * 1000L;
                 String message = "Server appears down during seeding: " + exception.getMessage();

Modified: manifoldcf/trunk/connectors/nuxeo/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/nuxeo/NuxeoConnectorTest.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/nuxeo/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/nuxeo/NuxeoConnectorTest.java?rev=1828427&r1=1828426&r2=1828427&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/nuxeo/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/nuxeo/NuxeoConnectorTest.java
(original)
+++ manifoldcf/trunk/connectors/nuxeo/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/nuxeo/NuxeoConnectorTest.java
Thu Apr  5 12:52:12 2018
@@ -246,7 +246,7 @@ public class NuxeoConnectorTest {
                 BaseRepositoryConnector.JOBMODE_CONTINUOUS, true);
         ArgumentCaptor<RepositoryDocument> ac = ArgumentCaptor.forClass(RepositoryDocument.class);
 
-        verify(activities, times(1)).checkDocumentNeedsReindexing(uid, version);
+        verify(activities, times(1)).checkDocumentNeedsReindexing(uid, lastModified);
         verify(activities, times(0)).ingestDocumentWithException(anyString(), anyString(),
anyString(), ac.capture());
 
     }



Mime
View raw message