Uploaded image for project: 'ManifoldCF'
  1. ManifoldCF
  2. CONNECTORS-1080

Remove deprecated "content" field from elasticsearch connector

    Details

      Description

      [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.

      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("\"}");
      

        Attachments

          Activity

            People

            • Assignee:
              kwright@metacarta.com Karl Wright
              Reporter:
              jan0sch Jens Grassel
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: