manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1487162 - in /manifoldcf/trunk: CHANGES.txt connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java
Date Tue, 28 May 2013 23:33:08 GMT
Author: kwright
Date: Tue May 28 23:33:07 2013
New Revision: 1487162

URL: http://svn.apache.org/r1487162
Log:
Fix for CONNECTORS-690.

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1487162&r1=1487161&r2=1487162&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Tue May 28 23:33:07 2013
@@ -3,6 +3,11 @@ $Id$
 
 ======================= 1.3-dev =====================
 
+CONNECTORS-690: For ElasticSearch connector, include _name and
+_content_type field within "file" portion of JSON, so it will work properly
+with the Mapper Attachment Plugin.
+(Richard Nichols, Karl Wright)
+
 CONNECTORS-692: Add support for basic auth in wiki connector.
 (TC Tobin-Campbell, Karl Wright)
 

Modified: manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java?rev=1487162&r1=1487161&r2=1487162&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java
(original)
+++ manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java
Tue May 28 23:33:07 2013
@@ -117,16 +117,17 @@ public class ElasticSearchIndex extends 
             pw.print(",");
           }
           pw.print("\"type\" : \"attachment\",");
+          pw.print("\"file\" : {");
           String contentType = document.getMimeType();
           if (contentType != null)
             pw.print("\"_content_type\" : "+jsonStringEscape(contentType)+",");
           String fileName = document.getFileName();
           if (fileName != null)
             pw.print("\"_name\" : "+jsonStringEscape(fileName)+",");
-          pw.print("\"file\" : \"");
+          pw.print(" \"content\" : \"");
           Base64 base64 = new Base64();
           base64.encodeStream(inputStream, pw);
-          pw.print("\"");
+          pw.print("\"}");
         }
         
         pw.print("}");



Mime
View raw message