manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1302522 - in /incubator/lcf/trunk: ./ connectors/elasticsearch/ connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifol...
Date Mon, 19 Mar 2012 16:06:45 GMT
Author: kwright
Date: Mon Mar 19 16:06:44 2012
New Revision: 1302522

URL: http://svn.apache.org/viewvc?rev=1302522&view=rev
Log:
Fixes for CONNECTORS-423 and partial fixes for CONNECTORS-425, pulled up from CONNECTORS-423
branch.  We're still missing Japanese images for the ElasticSearch connector.

Added:
    incubator/lcf/trunk/site/src/documentation/resources/images/en_US/elasticsearch-connection-parameters.png
      - copied unchanged from r1302518, incubator/lcf/branches/CONNECTORS-423/site/src/documentation/resources/images/en_US/elasticsearch-connection-parameters.png
    incubator/lcf/trunk/site/src/documentation/resources/images/en_US/elasticsearch-history-report.png
      - copied unchanged from r1302518, incubator/lcf/branches/CONNECTORS-423/site/src/documentation/resources/images/en_US/elasticsearch-history-report.png
    incubator/lcf/trunk/site/src/documentation/resources/images/en_US/elasticsearch-job-parameters.png
      - copied unchanged from r1302518, incubator/lcf/branches/CONNECTORS-423/site/src/documentation/resources/images/en_US/elasticsearch-job-parameters.png
Modified:
    incubator/lcf/trunk/   (props changed)
    incubator/lcf/trunk/CHANGES.txt
    incubator/lcf/trunk/build.xml
    incubator/lcf/trunk/connectors/elasticsearch/build.xml
    incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchAction.java
    incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConfig.java
    incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnection.java
    incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnector.java
    incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchDelete.java
    incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java
    incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchParam.java
    incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchSpecs.java
    incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_en_US.properties
    incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_ja_JP.properties
    incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_Parameters.html
    incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/viewConfiguration.html
    incubator/lcf/trunk/connectors/elasticsearch/connector/src/test/java/org/apache/manifoldcf/agents/output/elasticsearch/tests/BaseHSQLDB.java
    incubator/lcf/trunk/connectors/elasticsearch/connector/src/test/java/org/apache/manifoldcf/agents/output/elasticsearch/tests/BasePostgresql.java
    incubator/lcf/trunk/site/src/documentation/content/xdocs/en_US/end-user-documentation.xml
    incubator/lcf/trunk/tests/elasticsearch/build.xml
    incubator/lcf/trunk/tests/elasticsearch/pom.xml
    incubator/lcf/trunk/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/APISanityDerbyIT.java
    incubator/lcf/trunk/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/NavigationDerbyUI.java

Propchange: incubator/lcf/trunk/
------------------------------------------------------------------------------
  Merged /incubator/lcf/branches/CONNECTORS-423:r1301010-1302518

Modified: incubator/lcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/CHANGES.txt?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/CHANGES.txt (original)
+++ incubator/lcf/trunk/CHANGES.txt Mon Mar 19 16:06:44 2012
@@ -3,6 +3,12 @@ $Id$
 
 ======================= 0.5-dev =====================
 
+CONNECTORS-425: Elastic Search documentation missing images
+(Piergiorgio Lucidi)
+
+CONNECTORS-423: Elastic Search connector should handle document metadata
+(Luca Stancapiano, Piergiorgio Lucidi, Karl Wright)
+
 CONNECTORS-424: Add RepositoryDocument.getFileName for posting file
 name as metadata.
 (Shinichiro Abe)

Modified: incubator/lcf/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/build.xml?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/build.xml (original)
+++ incubator/lcf/trunk/build.xml Mon Mar 19 16:06:44 2012
@@ -1600,7 +1600,7 @@
     </target>
 
     <target name="calculate-elasticsearch-testmaterials-condition" depends="calculate-elasticsearch-condition">
-        <available file="connectors/elasticsearch/test-materials-proprietary/elasticsearch-0.18.7"
type="dir" property="elasticsearch-testmaterials.exists"/>
+        <available file="connectors/elasticsearch/test-materials-proprietary/elasticsearch-0.19.0"
type="dir" property="elasticsearch-testmaterials.exists"/>
         <condition property="elasticsearch-testmaterials.include">
           <and>
               <isset property="elasticsearch-testmaterials.exists"/>
@@ -1612,7 +1612,7 @@
     <target name="calculate-elasticsearch-tests-condition" depends="calculate-elasticsearch-testmaterials-condition,calculate-elasticsearch-condition,calculate-cmis-condition">
       <condition property="elasticsearch-tests.include">
         <and>
-            <not>
+        	  <not>
                 <equals arg1="${ant.java.version}" arg2="1.5" />
             </not>
             <isset property="elasticsearch.include"/>
@@ -1634,7 +1634,8 @@
             <param name="connector-name" value="elasticsearch"/>
         </antcall>
         <antcall target="general-add-output-connector">
-            <param name="connector-name" value="ElasticSearch"/>
+            <param name="connector-name" value="elasticsearch"/>
+        	<param name="connector-label" value="ElasticSearch"/>
             <param name="connector-class" value="org.apache.manifoldcf.agents.output.elasticsearch.ElasticSearchConnector"/>
         </antcall>
     </target>

Modified: incubator/lcf/trunk/connectors/elasticsearch/build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/elasticsearch/build.xml?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/elasticsearch/build.xml (original)
+++ incubator/lcf/trunk/connectors/elasticsearch/build.xml Mon Mar 19 16:06:44 2012
@@ -20,10 +20,28 @@
     <import file="../connector-build.xml"/>
 
     <target name="download-dependencies">
+        
         <mkdir dir="build/download"/>
-        <get src="http://cloud.github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.7.tar.gz"
dest="build/download/elasticsearch.tar.gz"/>
+        <get src="http://cloud.github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.0.tar.gz"

+          dest="build/download/elasticsearch.tar.gz"/>
         <gunzip src="build/download/elasticsearch.tar.gz"/>
         <untar src="build/download/elasticsearch.tar" dest="test-materials-proprietary"/>
+        
+        <!-- download and install the attachment plugin -->
+        <mkdir dir="test-materials-proprietary/elasticsearch-0.19.0/plugins"/>
+        
+        <get src="http://cloud.github.com/downloads/elasticsearch/elasticsearch-mapper-attachments/elasticsearch-mapper-attachments-1.2.0.zip"

+          dest="test-materials-proprietary/elasticsearch-0.19.0/plugins/mapper-attachments.zip"/>
+        
+        <unzip src="test-materials-proprietary/elasticsearch-0.19.0/plugins/mapper-attachments.zip"
dest="test-materials-proprietary/elasticsearch-0.19.0/plugins/mapper-attachments"/>
+        
+        <chmod dir="test-materials-proprietary/elasticsearch-0.19.0" perm="ugo+rxw">
+         <fileset dir="**/*"/>
+        </chmod>
+        <chmod file="test-materials-proprietary/elasticsearch-0.19.0/bin/plugin" perm="ugo+rx"/>
+        <chmod file="test-materials-proprietary/elasticsearch-0.19.0/bin/elasticsearch"
perm="ugo+rx"/>
+        <chmod file="test-materials-proprietary/elasticsearch-0.19.0/bin/elasticsearch.in.sh"
perm="ugo+rx"/>
+      
     </target>
 
 </project>

Modified: incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchAction.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchAction.java?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchAction.java
(original)
+++ incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchAction.java
Mon Mar 19 16:06:44 2012
@@ -1,3 +1,5 @@
+/* $Id: ElasticSearchAction.java 1299512 2012-03-12 00:58:38Z piergiorgio $ */
+
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements. See the NOTICE file distributed with

Modified: incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConfig.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConfig.java?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConfig.java
(original)
+++ incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConfig.java
Mon Mar 19 16:06:44 2012
@@ -1,3 +1,5 @@
+/* $Id: ElasticSearchConfig.java 1299512 2012-03-12 00:58:38Z piergiorgio $ */
+
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements. See the NOTICE file distributed with
@@ -31,7 +33,7 @@ public class ElasticSearchConfig extends
   /** Parameters used for the configuration */
   final private static ParameterEnum[] CONFIGURATIONLIST =
   { ParameterEnum.SERVERLOCATION, ParameterEnum.INDEXNAME,
-      ParameterEnum.INDEXTYPE, ParameterEnum.USERNAME, ParameterEnum.APIKEY };
+      ParameterEnum.INDEXTYPE};
 
   /** Build a set of ElasticSearchParameters by reading ConfigParams. If the
    * value returned by ConfigParams.getParameter is null, the default value is
@@ -88,13 +90,4 @@ public class ElasticSearchConfig extends
     return get(ParameterEnum.INDEXTYPE);
   }
 
-  final public String getUserName()
-  {
-    return get(ParameterEnum.USERNAME);
-  }
-
-  final public String getApiKey()
-  {
-    return get(ParameterEnum.APIKEY);
-  }
 }

Modified: incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnection.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnection.java?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnection.java
(original)
+++ incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnection.java
Mon Mar 19 16:06:44 2012
@@ -1,3 +1,5 @@
+/* $Id: ElasticSearchConnection.java 1299512 2012-03-12 00:58:38Z piergiorgio $ */
+
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements. See the NOTICE file distributed with
@@ -35,10 +37,6 @@ public class ElasticSearchConnection
 
   private String indexName;
 
-  private String userName;
-
-  private String apiKey;
-
   private String resultDescription;
 
   private String callUrlSnippet;
@@ -64,8 +62,6 @@ public class ElasticSearchConnection
     callUrlSnippet = null;
     serverLocation = config.getServerLocation();
     indexName = config.getIndexName();
-    userName = config.getUserName();
-    apiKey = config.getApiKey();
   }
 
   protected final String urlEncode(String t) throws ManifoldCFException
@@ -88,14 +84,6 @@ public class ElasticSearchConnection
       url.append(urlEncode(indexName)+"/");
     url.append(command);
     callUrlSnippet = url.toString();
-    if (userName != null && apiKey != null && userName.length() > 0
-        && apiKey.length() > 0)
-    {
-      url.append("&login=");
-      url.append(urlEncode(userName));
-      url.append("&key=");
-      url.append(apiKey);
-    }
     return url;
   }
 

Modified: incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnector.java?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnector.java
(original)
+++ incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnector.java
Mon Mar 19 16:06:44 2012
@@ -1,3 +1,5 @@
+/* $Id: ElasticSearchConnector.java 1299512 2012-03-12 00:58:38Z piergiorgio $ */
+
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements. See the NOTICE file distributed with
@@ -86,8 +88,6 @@ public class ElasticSearchConnector exte
 
   private MultiThreadedHttpConnectionManager connectionManager = null;
   private HttpClient client = null;
-  private String specsCacheOutpuDescription = null;
-  private ElasticSearchSpecs specsCache = null;
 
   public ElasticSearchConnector()
   {
@@ -319,8 +319,8 @@ public class ElasticSearchConnector exte
     ElasticSearchConfig config = getConfigParameters(null);
     InputStream inputStream = document.getBinaryStream();
     long startTime = System.currentTimeMillis();
-    ElasticSearchIndex oi = new ElasticSearchIndex(client, documentURI,
-      inputStream, config);
+    ElasticSearchIndex oi = new ElasticSearchIndex(client, documentURI, 
+        document, inputStream, config);
     activities.recordActivity(startTime, ELASTICSEARCH_INDEXATION_ACTIVITY,
       document.getBinaryLength(), documentURI, oi.getResult().name(),
       oi.getResultDescription());

Modified: incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchDelete.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchDelete.java?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchDelete.java
(original)
+++ incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchDelete.java
Mon Mar 19 16:06:44 2012
@@ -1,3 +1,5 @@
+/* $Id: ElasticSearchDelete.java 1299512 2012-03-12 00:58:38Z piergiorgio $ */
+
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements. See the NOTICE file distributed with
@@ -17,9 +19,8 @@
 
 package org.apache.manifoldcf.agents.output.elasticsearch;
 
-import org.apache.commons.httpclient.methods.DeleteMethod;
 import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.httpclient.methods.DeleteMethod;
 import org.apache.manifoldcf.core.interfaces.ManifoldCFException;
 
 public class ElasticSearchDelete extends ElasticSearchConnection

Modified: incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java
(original)
+++ incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java
Mon Mar 19 16:06:44 2012
@@ -1,3 +1,5 @@
+/* $Id: ElasticSearchIndex.java 1299512 2012-03-12 00:58:38Z piergiorgio $ */
+
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements. See the NOTICE file distributed with
@@ -21,12 +23,13 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.PrintWriter;
+import java.util.Iterator;
 
-import org.apache.commons.httpclient.methods.PutMethod;
 import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.methods.PutMethod;
 import org.apache.commons.httpclient.methods.RequestEntity;
-import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.io.IOUtils;
+import org.apache.manifoldcf.agents.interfaces.RepositoryDocument;
 import org.apache.manifoldcf.core.common.Base64;
 import org.apache.manifoldcf.core.interfaces.ManifoldCFException;
 
@@ -36,11 +39,13 @@ public class ElasticSearchIndex extends 
   private class IndexRequestEntity implements RequestEntity
   {
 
+    private RepositoryDocument document;
     private InputStream inputStream;
 
-    public IndexRequestEntity(InputStream inputStream)
+    public IndexRequestEntity(RepositoryDocument document, InputStream inputStream)
       throws ManifoldCFException
     {
+      this.document = document;
       this.inputStream = inputStream;
     }
 
@@ -65,14 +70,41 @@ public class ElasticSearchIndex extends 
       try
       {
         pw.print("{");
-        //pw.print("\"fieldName\" : ");
-        //pw.print("\"" + documentURI + "\"" + ",");
-        //pw.print("\"fileName\" : ");
-        //pw.print("\"" + fileName + "\"" + ",");
-        pw.print("\"binaryValue\" : \"");
-        Base64 base64 = new Base64();
-        base64.encodeStream(inputStream, pw);
-        pw.print("\"");
+        Iterator<String> i = document.getFields();
+        boolean existentFields = false;
+        while (i.hasNext()){
+          String fieldName = i.next();
+          String[] fieldValues = document.getFieldAsStrings(fieldName);
+          if(fieldValues.length>1){
+            for(int j=0; j<fieldValues.length; j++){
+              String fieldValue = fieldValues[j];
+              pw.print("\""+fieldName+"\" : \""+fieldValue+"\"");
+              if(j<fieldValues.length-1){
+                pw.print(",");
+              }
+              existentFields = true;
+            }
+          } else if(fieldValues.length==1){
+            String fieldValue = fieldValues[0];
+            pw.print("\""+fieldName+"\" : \""+fieldValue+"\"");
+            if(i.hasNext()){
+              pw.print(",");
+            }
+            existentFields = true;
+          }
+        }
+        
+        if(inputStream!=null){
+          if(existentFields){
+            pw.print(",");
+          }
+          pw.print("\"type\" : \"attachment\",");
+          pw.print("\"file\" : \"");
+          Base64 base64 = new Base64();
+          base64.encodeStream(inputStream, pw);
+          pw.print("\"");
+        }
+        
         pw.print("}");
       } catch (ManifoldCFException e)
       {
@@ -84,8 +116,8 @@ public class ElasticSearchIndex extends 
     }
   }
 
-  public ElasticSearchIndex(HttpClient client, String documentURI, InputStream inputStream,
-      ElasticSearchConfig config) throws ManifoldCFException
+  public ElasticSearchIndex(HttpClient client, String documentURI, RepositoryDocument document,

+      InputStream inputStream, ElasticSearchConfig config) throws ManifoldCFException
   {
     super(config, client);
     
@@ -101,7 +133,7 @@ public class ElasticSearchIndex extends 
 
     StringBuffer url = getApiUrl(config.getIndexType() + "/" + idField, false);
     PutMethod put = new PutMethod(url.toString());
-    RequestEntity entity = new IndexRequestEntity(inputStream);
+    RequestEntity entity = new IndexRequestEntity(document, inputStream);
     put.setRequestEntity(entity);
     call(put);
     if ("true".equals(checkJson(jsonStatus)))

Modified: incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchParam.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchParam.java?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchParam.java
(original)
+++ incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchParam.java
Mon Mar 19 16:06:44 2012
@@ -1,3 +1,5 @@
+/* $Id: ElasticSearchParam.java 1299512 2012-03-12 00:58:38Z piergiorgio $ */
+
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements. See the NOTICE file distributed with
@@ -37,10 +39,6 @@ public class ElasticSearchParam extends 
 
 		INDEXTYPE("generictype"),
 
-		USERNAME(""),
-
-		APIKEY(""),
-
 		FIELDLIST(""),
 
 		MAXFILESIZE("16777216"),

Modified: incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchSpecs.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchSpecs.java?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchSpecs.java
(original)
+++ incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchSpecs.java
Mon Mar 19 16:06:44 2012
@@ -1,3 +1,5 @@
+/* $Id: ElasticSearchSpecs.java 1299512 2012-03-12 00:58:38Z piergiorgio $ */
+
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements. See the NOTICE file distributed with

Modified: incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_en_US.properties
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_en_US.properties?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_en_US.properties
(original)
+++ incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_en_US.properties
Mon Mar 19 16:06:44 2012
@@ -19,8 +19,6 @@ ElasticSearchConnector.ServerLocation=Se
 ElasticSearchConnector.URLColon=(URL):
 ElasticSearchConnector.IndexNameColon=Index name:
 ElasticSearchConnector.IndexTypeColon=Index type:
-ElasticSearchConnector.UserNameColon=User name:
-ElasticSearchConnector.APIKeyColon=API Key:
 
 ElasticSearchConnector.PleaseSupplyValidElasticSearchLocation=Please supply a valid ElasticSearch
server location
 ElasticSearchConnector.PleaseSupplyValidIndexName=Please supply a valid index name
@@ -30,4 +28,4 @@ ElasticSearchConnector.ElasticSearch=Ela
 
 ElasticSearchConnector.MaxFileSizeBytesColon=Max file size (bytes):
 ElasticSearchConnector.AllowedMIMETypesColon=Allowed MIME Types:
-ElasticSearchConnector.AllowedFileExtensionsColon=Allowed file extensions:
\ No newline at end of file
+ElasticSearchConnector.AllowedFileExtensionsColon=Allowed file extensions\:
\ No newline at end of file

Modified: incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_ja_JP.properties?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_ja_JP.properties
(original)
+++ incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_ja_JP.properties
Mon Mar 19 16:06:44 2012
@@ -19,8 +19,6 @@ ElasticSearchConnector.ServerLocation=ã
 ElasticSearchConnector.URLColon=(URL):
 ElasticSearchConnector.IndexNameColon=索引名:
 ElasticSearchConnector.IndexTypeColon=索引名:
-ElasticSearchConnector.UserNameColon=ユーザ名:
-ElasticSearchConnector.APIKeyColon=APIキー:
 
 ElasticSearchConnector.PleaseSupplyValidElasticSearchLocation=正しいElasticSearchサーバURLを入力してください
 ElasticSearchConnector.PleaseSupplyValidIndexName=正しい索引名を入力してください

Modified: incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_Parameters.html
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_Parameters.html?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_Parameters.html
(original)
+++ incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_Parameters.html
Mon Mar 19 16:06:44 2012
@@ -37,16 +37,6 @@
     <td class="value"><input name="indextype" type="text" value="$Encoder.attributeEscape($INDEXTYPE)"
       size="24" /></td>
   </tr>
-  <tr>
-    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.UserNameColon'))</nobr></td>
-    <td class="value"><input name="username" type="text" value="$Encoder.attributeEscape($USERNAME)"
-      size="24" /></td>
-  </tr>
-  <tr>
-    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.APIKeyColon'))</nobr></td>
-    <td class="value"><input name="apikey" type="text" value="$Encoder.attributeEscape($APIKEY)"
-      size="40" /></td>
-  </tr>
 </table>
 
 #else
@@ -54,7 +44,5 @@
 <input type="hidden" name="serverlocation" value="$Encoder.attributeEscape($SERVERLOCATION)"
/>
 <input type="hidden" name="indexname" value="$Encoder.attributeEscape($INDEXNAME)" />
 <input type="hidden" name="indextype" value="$Encoder.attributeEscape($INDEXTYPE)" />
-<input type="hidden" name="username" value="$Encoder.attributeEscape($USERNAME)" />
-<input type="hidden" name="apikey" value="$Encoder.attributeEscape($APIKEY)" />
 
 #end

Modified: incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/viewConfiguration.html
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/viewConfiguration.html?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/viewConfiguration.html
(original)
+++ incubator/lcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/viewConfiguration.html
Mon Mar 19 16:06:44 2012
@@ -29,12 +29,4 @@
     <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.IndexTypeColon'))</nobr></td>
     <td class="value">$Encoder.bodyEscape($INDEXTYPE)</td>
   </tr>
-  <tr>
-    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.UserNameColon'))</nobr></td>
-    <td class="value">$Encoder.bodyEscape($USERNAME)</td>
-  </tr>
-  <tr>
-    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.APIKeyColon'))</nobr></td>
-    <td class="value">$Encoder.bodyEscape($APIKEY)</td>
-  </tr>
 </table>
\ No newline at end of file

Modified: incubator/lcf/trunk/connectors/elasticsearch/connector/src/test/java/org/apache/manifoldcf/agents/output/elasticsearch/tests/BaseHSQLDB.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/elasticsearch/connector/src/test/java/org/apache/manifoldcf/agents/output/elasticsearch/tests/BaseHSQLDB.java?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/elasticsearch/connector/src/test/java/org/apache/manifoldcf/agents/output/elasticsearch/tests/BaseHSQLDB.java
(original)
+++ incubator/lcf/trunk/connectors/elasticsearch/connector/src/test/java/org/apache/manifoldcf/agents/output/elasticsearch/tests/BaseHSQLDB.java
Mon Mar 19 16:06:44 2012
@@ -16,7 +16,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-package org.apache.manifoldcf.crawler.connectors.cmis.tests;
+package org.apache.manifoldcf.agents.output.elasticsearch.tests;
 
 
 /** This is a testing base class that is responsible for setting up/tearing down the agents
framework. */

Modified: incubator/lcf/trunk/connectors/elasticsearch/connector/src/test/java/org/apache/manifoldcf/agents/output/elasticsearch/tests/BasePostgresql.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/elasticsearch/connector/src/test/java/org/apache/manifoldcf/agents/output/elasticsearch/tests/BasePostgresql.java?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/elasticsearch/connector/src/test/java/org/apache/manifoldcf/agents/output/elasticsearch/tests/BasePostgresql.java
(original)
+++ incubator/lcf/trunk/connectors/elasticsearch/connector/src/test/java/org/apache/manifoldcf/agents/output/elasticsearch/tests/BasePostgresql.java
Mon Mar 19 16:06:44 2012
@@ -16,7 +16,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-package org.apache.manifoldcf.crawler.connectors.cmis.tests;
+package org.apache.manifoldcf.agents.output.elasticsearch.tests;
 
 
 /** This is a testing base class that is responsible for setting up/tearing down the agents
framework. */

Modified: incubator/lcf/trunk/site/src/documentation/content/xdocs/en_US/end-user-documentation.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/site/src/documentation/content/xdocs/en_US/end-user-documentation.xml?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/site/src/documentation/content/xdocs/en_US/end-user-documentation.xml
(original)
+++ incubator/lcf/trunk/site/src/documentation/content/xdocs/en_US/end-user-documentation.xml
Mon Mar 19 16:06:44 2012
@@ -510,26 +510,24 @@
             	to be as easy to use as possible.</p>
             	<p>After creating an ElasticSearch ouput connection, you have to populate
the parameters tab. Fill in the fields according your ElasticSearch configuration. Each
             	ElasticSearch output connector instance works with one index. To work with multiple
indexes, just create one output connector for each index.</p>
-            	<!--figure src="images/en_US/elasticsearch-connection-parameters.PNG" alt="ElasticSearch,
parameters tab" width="80%"/-->
-            	<p>The parameters are:</p><br/>
+            	<figure src="images/en_US/elasticsearch-connection-parameters.png" alt="ElasticSearch,
parameters tab" width="80%"/>
+            	<br />
+            	<p>The parameters are:</p>
             	<ul>
-            		<li>Server location: An URL that references your ElasticSearch instance.
The default value (http://localhost:8080) is valid if your ElasticSearch instance runs
+            		<li>Server location: An URL that references your ElasticSearch instance.
The default value (http://localhost:9200) is valid if your ElasticSearch instance runs
             		on the same server than the ManifoldCF instance.</li>
             		<li>Index name: The connector will populate the index defined here.</li>
-            		<li>User name and API Key: The credentials required to connect to the
ElasticSearch instance. It can be left empty if no user has been created. The next figure
shows
-            		where to find the user's informations in the ElasticSearch user interface.</li>
             	</ul>
-            	<!--figure src="images/en_US/elasticsearch-user.PNG" alt="ElasticSearch,
user configuration" width="80%"/-->
-            	<p>Once you created a new job, having selected the ElasticSearch output
connector, you will have the ElasticSearch tab. This tab let you:</p><br/>
+            	<br /><p>Once you created a new job, having selected the ElasticSearch
output connector, you will have the ElasticSearch tab. This tab let you:</p>
             	<ul>
             		<li>Fix the maximum size of a document before deciding to index it. The
value is in bytes. The default value is 16MB.</li>
             		<li>The allowed mime types. Warning it does not work with all repository
connectors.</li>
             		<li>The allowed file extensions. Warning it does not work with all repository
connectors.</li>
             	</ul>
-            	<!--figure src="images/en_US/elasticsearch-job-parameters.PNG" alt="ElasticSearch,
job parameters" width="80%"/-->
+            	<figure src="images/en_US/elasticsearch-job-parameters.png" alt="ElasticSearch,
job parameters" width="80%"/>
             	<p>In the history report you will be able to monitor all the activites.
The connector supports three activites: Document ingestion (Indexation), document deletion
and
             	   index optimization. The targeted index is automatically optimized when the
job is ending.</p>
-            	<!--figure src="images/en_US/elasticsearch-history-report.PNG" alt="ElasticSearch,
history report" width="80%"/-->
+            	<figure src="images/en_US/elasticsearch-history-report.png" alt="ElasticSearch,
history report" width="80%"/>
              	<p>You may also refer to <a href="http://www.elasticsearch.org/guide">ElasticSearch's
user documentation</a>.</p>
             </section>
             

Modified: incubator/lcf/trunk/tests/elasticsearch/build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/elasticsearch/build.xml?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/tests/elasticsearch/build.xml (original)
+++ incubator/lcf/trunk/tests/elasticsearch/build.xml Mon Mar 19 16:06:44 2012
@@ -23,6 +23,7 @@
         <path refid="mcf-icmis-test-build.test-classpath"/>
         <fileset dir="../../connectors/elasticsearch/test-materials-proprietary">
             <include name="elasticsearch*/lib/*.jar"/>
+        	  <include name="elasticsearch*/plugins/mapper-attachments/*.jar"/>
         </fileset>
     </path>
 
@@ -38,11 +39,8 @@
                 <pathelement location="build/test/classes"/>
             </classpath>
             <formatter type="brief" usefile="false"/>
-            <batchtest todir="test-derby-output">
-                <fileset dir="build/test/classes">
-                    <include name="**/*DerbyIT.class"/>
-                </fileset>
-            </batchtest>
+        	  
+        	  <test name="org.apache.manifoldcf.elasticsearch_tests.APISanityDerbyIT" todir="test-derby-output"/>
         </junit>
     </target>
 

Modified: incubator/lcf/trunk/tests/elasticsearch/pom.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/elasticsearch/pom.xml?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/tests/elasticsearch/pom.xml (original)
+++ incubator/lcf/trunk/tests/elasticsearch/pom.xml Mon Mar 19 16:06:44 2012
@@ -307,7 +307,7 @@
     <dependency>
 	    <groupId>org.elasticsearch</groupId>
 	    <artifactId>elasticsearch</artifactId>
-	    <version>0.18.7</version>
+	    <version>0.19.0</version>
     </dependency>
     <dependency>
       <groupId>org.apache.lucene</groupId>
@@ -332,12 +332,19 @@
     <dependency>
       <groupId>org.apache.lucene</groupId>
       <artifactId>lucene-highlighter</artifactId>
-      <version>2.4.0</version>
+      <version>3.5.0</version>
     </dependency>
     <dependency>
       <groupId>org.apache.lucene</groupId>
       <artifactId>lucene-queries</artifactId>
-      <version>2.4.0</version>
+      <version>3.5.0</version>
+    </dependency>
+    
+    <!-- Attachment Plugin -->
+    <dependency>
+      <groupId>org.elasticsearch</groupId>
+      <artifactId>elasticsearch-mapper-attachments</artifactId>
+      <version>1.2.0</version>
     </dependency>
   </dependencies>
 </project>
\ No newline at end of file

Modified: incubator/lcf/trunk/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/APISanityDerbyIT.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/APISanityDerbyIT.java?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/APISanityDerbyIT.java
(original)
+++ incubator/lcf/trunk/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/APISanityDerbyIT.java
Mon Mar 19 16:06:44 2012
@@ -325,18 +325,6 @@ public class APISanityDerbyIT extends Ba
       indexType.setValue("generictype");
       child.addChild(child.getChildCount(), indexType);
       
-      //username
-      ConfigurationNode username = new ConfigurationNode("_PARAMETER_");
-      username.setAttribute("name", "username");
-      username.setValue("");
-      child.addChild(child.getChildCount(), username);
-      
-      //apikey
-      ConfigurationNode apikey = new ConfigurationNode("_PARAMETER_");
-      apikey.setAttribute("name", "apikey");
-      apikey.setValue("");
-      child.addChild(child.getChildCount(), apikey);
-      
       connectionObject.addChild(connectionObject.getChildCount(),child);
       
       requestObject = new Configuration();

Modified: incubator/lcf/trunk/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/NavigationDerbyUI.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/NavigationDerbyUI.java?rev=1302522&r1=1302521&r2=1302522&view=diff
==============================================================================
--- incubator/lcf/trunk/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/NavigationDerbyUI.java
(original)
+++ incubator/lcf/trunk/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/NavigationDerbyUI.java
Mon Mar 19 16:06:44 2012
@@ -84,10 +84,6 @@ public class NavigationDerbyUI extends B
     textarea.setValue(testerInstance.createStringDescription("index"));
     textarea = form.findTextarea(testerInstance.createStringDescription("indextype"));
     textarea.setValue(testerInstance.createStringDescription("generictype"));
-    textarea = form.findTextarea(testerInstance.createStringDescription("username"));
-    textarea.setValue(testerInstance.createStringDescription("foo"));
-    textarea = form.findTextarea(testerInstance.createStringDescription("apikey"));
-    textarea.setValue(testerInstance.createStringDescription("bar"));
     
     // Go back to the Name tab
     link = window.findLink(testerInstance.createStringDescription("Name tab"));



Mime
View raw message