You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@manifoldcf.apache.org by "Jens Jahnke (JIRA)" <ji...@apache.org> on 2014/10/23 15:37:33 UTC

[jira] [Created] (CONNECTORS-1080) Remove deprecated "content" field from elasticsearch connector

Jens Jahnke created CONNECTORS-1080:
---------------------------------------

             Summary: Remove deprecated "content" field from elasticsearch connector
                 Key: CONNECTORS-1080
                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1080
             Project: ManifoldCF
          Issue Type: Improvement
          Components: Elastic Search connector
            Reporter: Jens Jahnke
            Priority: Minor


[PATCH] Make use of {{_content}} instead of {{content}}.

The usage of {{content}} is deprecated since 1.0 and elasticsearch is
currently running at version 1.3.x therefore it should be safe to move
to the usage of {{_content}}.

{code}
diff --git a/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java b/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java
index 5b9021b..e9d4bd0 100644
--- a/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java
+++ b/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java
@@ -144,7 +144,7 @@ public class ElasticSearchIndex extends ElasticSearchConnection
           String fileName = document.getFileName();
           if (fileName != null)
             pw.print("\"_name\" : "+jsonStringEscape(fileName)+",");
-          pw.print(" \"content\" : \"");
+          pw.print(" \"_content\" : \"");
           Base64 base64 = new Base64();
           base64.encodeStream(inputStream, pw);
           pw.print("\"}");
{code}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)