manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1730033 - in /manifoldcf/trunk: ./ connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsear...
Date Fri, 12 Feb 2016 14:50:07 GMT
Author: kwright
Date: Fri Feb 12 14:50:07 2016
New Revision: 1730033

URL: http://svn.apache.org/viewvc?rev=1730033&view=rev
Log:
Tentative fix for CONNECTORS-1275.

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConfig.java
    manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java
    manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchParam.java
    manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_en_US.properties
    manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_es_ES.properties
    manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_ja_JP.properties
    manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_zh_CN.properties
    manifoldcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_Parameters.html
    manifoldcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/viewConfiguration.html

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1730033&r1=1730032&r2=1730033&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Fri Feb 12 14:50:07 2016
@@ -3,6 +3,10 @@ $Id$
 
 ======================= 2.4-dev =====================
 
+CONNECTORS-1275: Help ES deal with dates properly.  Also added
+support for built-in Repository Document attributes.
+(Andrey Leybovich, Karl Wright)
+
 CONNECTORS-1272: Update _status command for Elastic Search to _stats.
 (Andrey Leybovich, Karl Wright)
 

Modified: manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConfig.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConfig.java?rev=1730033&r1=1730032&r2=1730033&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConfig.java
(original)
+++ manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConfig.java
Fri Feb 12 14:50:07 2016
@@ -37,7 +37,11 @@ public class ElasticSearchConfig extends
     ParameterEnum.INDEXNAME,
     ParameterEnum.INDEXTYPE,
     ParameterEnum.USEMAPPERATTACHMENTS,
-    ParameterEnum.CONTENTATTRIBUTENAME
+    ParameterEnum.CONTENTATTRIBUTENAME,
+    ParameterEnum.CREATEDDATEATTRIBUTENAME,
+    ParameterEnum.MODIFIEDDATEATTRIBUTENAME,
+    ParameterEnum.INDEXINGDATEATTRIBUTENAME,
+    ParameterEnum.MIMETYPEATTRIBUTENAME
   };
 
   /** Build a set of ElasticSearchParameters by reading ConfigParams. If the
@@ -114,4 +118,24 @@ public class ElasticSearchConfig extends
     return get(ParameterEnum.CONTENTATTRIBUTENAME);
   }
 
+  final public String getCreatedDateAttributeName()
+  {
+    return get(ParameterEnum.CREATEDDATEATTRIBUTENAME);
+  }
+
+  final public String getModifiedDateAttributeName()
+  {
+    return get(ParameterEnum.MODIFIEDDATEATTRIBUTENAME);
+  }
+
+  final public String getIndexingDateAttributeName()
+  {
+    return get(ParameterEnum.INDEXINGDATEATTRIBUTENAME);
+  }
+
+  final public String getMimeTypeAttributeName()
+  {
+    return get(ParameterEnum.MIMETYPEATTRIBUTENAME);
+  }
+
 }

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=1730033&r1=1730032&r2=1730033&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
Fri Feb 12 14:50:07 2016
@@ -29,6 +29,10 @@ import java.io.Reader;
 import java.nio.charset.StandardCharsets;
 import java.util.Iterator;
 
+import java.text.SimpleDateFormat;
+import java.util.TimeZone;
+import java.util.Date;
+
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpPut;
 import org.apache.http.Consts;
@@ -73,10 +77,19 @@ public class ElasticSearchIndex extends
     private final String[] parentDenyAcls;
     private final boolean useMapperAttachments;
     private final String contentAttributeName;
-
+    private final String createdDateAttributeName;
+    private final String modifiedDateAttributeName;
+    private final String indexingDateAttributeName;
+    private final String mimeTypeAttributeName;
+    
     public IndexRequestEntity(RepositoryDocument document, InputStream inputStream,
       String[] acls, String[] denyAcls, String[] shareAcls, String[] shareDenyAcls, String[]
parentAcls, String[] parentDenyAcls,
-      boolean useMapperAttachments, String contentAttributeName)
+      boolean useMapperAttachments,
+      String contentAttributeName,
+      String createdDateAttributeName,
+      String modifiedDateAttributeName,
+      String indexingDateAttributeName,
+      String mimeTypeAttributeName)
       throws ManifoldCFException
     {
       this.document = document;
@@ -89,6 +102,10 @@ public class ElasticSearchIndex extends
       this.parentDenyAcls = parentDenyAcls;
       this.useMapperAttachments = useMapperAttachments;
       this.contentAttributeName = contentAttributeName;
+      this.createdDateAttributeName = createdDateAttributeName;
+      this.modifiedDateAttributeName = modifiedDateAttributeName;
+      this.indexingDateAttributeName = indexingDateAttributeName;
+      this.mimeTypeAttributeName = mimeTypeAttributeName;
     }
 
     @Override
@@ -130,10 +147,40 @@ public class ElasticSearchIndex extends
         boolean needComma = false;
         while (i.hasNext()){
           String fieldName = i.next();
-          String[] fieldValues = document.getFieldAsStrings(fieldName);
-          needComma = writeField(pw, needComma, fieldName, fieldValues);
+          Date[] dateFieldValues = document.getFieldAsDates(fieldName);
+          if (dateFieldValues != null)
+          {
+            needComma = writeField(pw, needComma, fieldName, dateFieldValues);
+          }
+          else
+          {
+            String[] fieldValues = document.getFieldAsStrings(fieldName);
+            needComma = writeField(pw, needComma, fieldName, fieldValues);
+          }
         }
 
+        // Standard document fields
+        final Date createdDate = document.getCreatedDate();
+        if (createdDate != null && createdDateAttributeName != null && createdDateAttributeName.length()
> 0)
+        {
+          needComma = writeField(pw, needComma, createdDateAttributeName, new Date[]{createdDate});
+        }
+        final Date modifiedDate = document.getModifiedDate();
+        if (modifiedDate != null && modifiedDateAttributeName != null &&
modifiedDateAttributeName.length() > 0)
+        {
+          needComma = writeField(pw, needComma, modifiedDateAttributeName, new Date[]{modifiedDate});
+        }
+        final Date indexingDate = document.getIndexingDate();
+        if (indexingDate != null && indexingDateAttributeName != null &&
indexingDateAttributeName.length() > 0)
+        {
+          needComma = writeField(pw, needComma, indexingDateAttributeName, new Date[]{indexingDate});
+        }
+        final String mimeType = document.getMimeType();
+        if (mimeType != null && mimeTypeAttributeName != null && mimeTypeAttributeName.length()
> 0)
+        {
+          needComma = writeField(pw, needComma, mimeTypeAttributeName, new String[]{mimeType});
+        }
+        
         needComma = writeACLs(pw, needComma, "document", acls, denyAcls);
         needComma = writeACLs(pw, needComma, "share", shareAcls, shareDenyAcls);
         needComma = writeACLs(pw, needComma, "parent", parentAcls, parentDenyAcls);
@@ -234,6 +281,52 @@ public class ElasticSearchIndex extends
     }
     return needComma;
   }
+
+  private final static SimpleDateFormat DATE_FORMATTER;
+
+  static
+  {
+    String ISO_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
+    TimeZone UTC = TimeZone.getTimeZone("UTC");
+    DATE_FORMATTER = new SimpleDateFormat(ISO_FORMAT);
+    DATE_FORMATTER.setTimeZone(UTC);
+  }
+  
+  protected static String formatAsString(final Date dateValue)
+  {
+    return DATE_FORMATTER.format(dateValue);
+  }
+  
+  protected static boolean writeField(PrintWriter pw, boolean needComma,
+    String fieldName, Date[] fieldValues)
+    throws IOException
+  {
+    if (fieldValues == null)
+      return needComma;
+
+    if (fieldValues.length == 1){
+      if (needComma)
+        pw.print(",");
+      pw.print(jsonStringEscape(fieldName)+" : "+jsonStringEscape(formatAsString(fieldValues[0])));
+      needComma = true;
+      return needComma;
+    }
+
+    if (fieldValues.length > 1){
+      if (needComma)
+        pw.print(",");
+      StringBuilder sb = new StringBuilder();
+      sb.append("[");
+      for(int j=0; j<fieldValues.length; j++){
+        sb.append(jsonStringEscape(formatAsString(fieldValues[j]))).append(",");
+      }
+      sb.setLength(sb.length() - 1); // discard last ","
+      sb.append("]");
+      pw.print(jsonStringEscape(fieldName)+" : "+sb.toString());
+      needComma = true;
+    }
+    return needComma;
+  }
   
   /** Output an acl level */
   protected static boolean writeACLs(PrintWriter pw, boolean needComma,
@@ -302,7 +395,12 @@ public class ElasticSearchIndex extends
     HttpPut put = new HttpPut(url.toString());
     put.setEntity(new IndexRequestEntity(document, inputStream,
       acls, denyAcls, shareAcls, shareDenyAcls, parentAcls, parentDenyAcls,
-      config.getUseMapperAttachments(), config.getContentAttributeName()));
+      config.getUseMapperAttachments(),
+      config.getContentAttributeName(),
+      config.getCreatedDateAttributeName(),
+      config.getModifiedDateAttributeName(),
+      config.getIndexingDateAttributeName(),
+      config.getMimeTypeAttributeName()));
     if (call(put) == false)
       return false;
     String error = checkJson(jsonException);

Modified: manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchParam.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchParam.java?rev=1730033&r1=1730032&r2=1730033&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchParam.java
(original)
+++ manifoldcf/trunk/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchParam.java
Fri Feb 12 14:50:07 2016
@@ -30,42 +30,50 @@ import org.apache.manifoldcf.agents.outp
 public class ElasticSearchParam extends HashMap<ParameterEnum, String>
 {
 
-	/** Parameters constants */
-	public enum ParameterEnum
-	{
-		SERVERLOCATION("http://localhost:9200/"),
-
-		INDEXNAME("index"),
-
-		INDEXTYPE("generictype"),
-
-		USEMAPPERATTACHMENTS("true"),
-
-		CONTENTATTRIBUTENAME(""),
-
-		FIELDLIST("");
-
-		final protected String defaultValue;
-
-		private ParameterEnum(String defaultValue)
-		{
-			this.defaultValue = defaultValue;
-		}
-	}
-
-	private static final long serialVersionUID = -1593234685772720029L;
-
-	protected ElasticSearchParam(ParameterEnum[] params)
-	{
-		super(params.length);
-	}
-
-	final public Map<String, String> buildMap()
-	{
-		Map<String, String> rval = new HashMap<String, String>();
-		for (Map.Entry<ParameterEnum, String> entry : this.entrySet())
-			rval.put(entry.getKey().name(), entry.getValue());
-		return rval;
-	}
+  /** Parameters constants */
+  public enum ParameterEnum
+  {
+    SERVERLOCATION("http://localhost:9200/"),
+
+    INDEXNAME("index"),
+
+    INDEXTYPE("generictype"),
+
+    USEMAPPERATTACHMENTS("true"),
+
+    CONTENTATTRIBUTENAME(""),
+
+    CREATEDDATEATTRIBUTENAME(""),
+    
+    MODIFIEDDATEATTRIBUTENAME(""),
+    
+    INDEXINGDATEATTRIBUTENAME(""),
+    
+    MIMETYPEATTRIBUTENAME(""),
+    
+    FIELDLIST("");
+
+    final protected String defaultValue;
+
+    private ParameterEnum(String defaultValue)
+    {
+      this.defaultValue = defaultValue;
+    }
+  }
+
+  private static final long serialVersionUID = -1593234685772720029L;
+
+  protected ElasticSearchParam(ParameterEnum[] params)
+  {
+    super(params.length);
+  }
+
+  final public Map<String, String> buildMap()
+  {
+    Map<String, String> rval = new HashMap<String, String>();
+    for (Map.Entry<ParameterEnum, String> entry : this.entrySet())
+      rval.put(entry.getKey().name(), entry.getValue());
+    return rval;
+  }
 
 }

Modified: manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_en_US.properties?rev=1730033&r1=1730032&r2=1730033&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_en_US.properties
(original)
+++ manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_en_US.properties
Fri Feb 12 14:50:07 2016
@@ -21,6 +21,10 @@ ElasticSearchConnector.IndexNameColon=In
 ElasticSearchConnector.IndexTypeColon=Index type:
 ElasticSearchConnector.UseMapperAttachmentsColon=Use mapper-attachments:
 ElasticSearchConnector.ContentAttributeNameColon=Content field name:
+ElasticSearchConnector.CreatedDateAttributeNameColon=Created date field name:
+ElasticSearchConnector.ModifiedDateAttributeNameColon=Modified date field name:
+ElasticSearchConnector.IndexingDateAttributeNameColon=Indexing date field name:
+ElasticSearchConnector.MimeTypeAttributeNameColon=Mime type field name:
 
 ElasticSearchConnector.PleaseSupplyValidElasticSearchLocation=Please supply a valid ElasticSearch
server location
 ElasticSearchConnector.PleaseSupplyValidIndexName=Please supply a valid index name

Modified: manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_es_ES.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_es_ES.properties?rev=1730033&r1=1730032&r2=1730033&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_es_ES.properties
(original)
+++ manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_es_ES.properties
Fri Feb 12 14:50:07 2016
@@ -13,19 +13,25 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ElasticSearchConnector.Parameters=Parámetros
+ElasticSearchConnector.Parameters=Parámetros
 
-ElasticSearchConnector.ServerLocation=Ubicación del servidor
+ElasticSearchConnector.ServerLocation=Ubicación del servidor
 ElasticSearchConnector.URLColon=(URL):
-ElasticSearchConnector.IndexNameColon=El nombre de índice:
-ElasticSearchConnector.IndexTypeColon=tipo de índice:
+ElasticSearchConnector.IndexNameColon=El nombre de índice:
+ElasticSearchConnector.IndexTypeColon=tipo de índice:
+ElasticSearchConnector.UseMapperAttachmentsColon=Use mapper-attachments:
+ElasticSearchConnector.ContentAttributeNameColon=Content field name:
+ElasticSearchConnector.CreatedDateAttributeNameColon=Created date field name:
+ElasticSearchConnector.ModifiedDateAttributeNameColon=Modified date field name:
+ElasticSearchConnector.IndexingDateAttributeNameColon=Indexing date field name:
+ElasticSearchConnector.MimeTypeAttributeNameColon=Mime type field name:
 
-ElasticSearchConnector.PleaseSupplyValidElasticSearchLocation=Por favor suministre una posición
de servidor válida elástica de búsqueda
-ElasticSearchConnector.PleaseSupplyValidIndexName=Por favor proporcione un nombre de índice
válido
-ElasticSearchConnector.PleaseSupplyValidIndexType=Por favor, facilite un tipo de índice
válido
+ElasticSearchConnector.PleaseSupplyValidElasticSearchLocation=Por favor suministre una posición
de servidor válida elástica de búsqueda
+ElasticSearchConnector.PleaseSupplyValidIndexName=Por favor proporcione un nombre de índice
válido
+ElasticSearchConnector.PleaseSupplyValidIndexType=Por favor, facilite un tipo de índice
válido
 
-ElasticSearchConnector.ElasticSearch=Búsqueda elástica
+ElasticSearchConnector.ElasticSearch=Búsqueda elástica
 
-ElasticSearchConnector.MaxFileSizeBytesColon=Tamaño máximo de archivo (bytes):
+ElasticSearchConnector.MaxFileSizeBytesColon=Tamaño máximo de archivo (bytes):
 ElasticSearchConnector.AllowedMIMETypesColon=Tipos de MIME permitidos:
-ElasticSearchConnector.AllowedFileExtensionsColon=Extensiones de archivo permitidos\:
\ No newline at end of file
+ElasticSearchConnector.AllowedFileExtensionsColon=Extensiones de archivo permitidos:

Modified: manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_ja_JP.properties?rev=1730033&r1=1730032&r2=1730033&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_ja_JP.properties
(original)
+++ manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_ja_JP.properties
Fri Feb 12 14:50:07 2016
@@ -21,6 +21,10 @@ ElasticSearchConnector.IndexNameColon=ã
 ElasticSearchConnector.IndexTypeColon=タイプ名:
 ElasticSearchConnector.UseMapperAttachmentsColon=Use mapper-attachments:
 ElasticSearchConnector.ContentAttributeNameColon=Content field name:
+ElasticSearchConnector.CreatedDateAttributeNameColon=Created date field name:
+ElasticSearchConnector.ModifiedDateAttributeNameColon=Modified date field name:
+ElasticSearchConnector.IndexingDateAttributeNameColon=Indexing date field name:
+ElasticSearchConnector.MimeTypeAttributeNameColon=Mime type field name:
 
 ElasticSearchConnector.PleaseSupplyValidElasticSearchLocation=正しいElasticSearchサーバURLを入力してください
 ElasticSearchConnector.PleaseSupplyValidIndexName=正しいインデックス名を入力してください

Modified: manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_zh_CN.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_zh_CN.properties?rev=1730033&r1=1730032&r2=1730033&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_zh_CN.properties
(original)
+++ manifoldcf/trunk/connectors/elasticsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/elasticsearch/common_zh_CN.properties
Fri Feb 12 14:50:07 2016
@@ -21,7 +21,10 @@ ElasticSearchConnector.IndexNameColon=ç
 ElasticSearchConnector.IndexTypeColon=索引类型: 
 ElasticSearchConnector.UseMapperAttachmentsColon=Use mapper-attachments:
 ElasticSearchConnector.ContentAttributeNameColon=Content field name:
-ElasticSearchConnector.MaxDocumentLengthColon=Maximum document length:
+ElasticSearchConnector.CreatedDateAttributeNameColon=Created date field name:
+ElasticSearchConnector.ModifiedDateAttributeNameColon=Modified date field name:
+ElasticSearchConnector.IndexingDateAttributeNameColon=Indexing date field name:
+ElasticSearchConnector.MimeTypeAttributeNameColon=Mime type field name:
 
 ElasticSearchConnector.PleaseSupplyValidElasticSearchLocation=请输入有效的Elasticsearch服务器URL
 ElasticSearchConnector.PleaseSupplyValidIndexName=请输入有效的索引名

Modified: manifoldcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_Parameters.html
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_Parameters.html?rev=1730033&r1=1730032&r2=1730033&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_Parameters.html
(original)
+++ manifoldcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/editConfiguration_Parameters.html
Fri Feb 12 14:50:07 2016
@@ -50,11 +50,33 @@
   #end
     </td>
   </tr>
+  
   <tr>
     <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.ContentAttributeNameColon'))</nobr></td>
     <td class="value"><input name="contentattributename" type="text" value="$Encoder.attributeEscape($CONTENTATTRIBUTENAME)"
       size="24" /></td>
   </tr>
+  <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.CreatedDateAttributeNameColon'))</nobr></td>
+    <td class="value"><input name="createddateattributename" type="text" value="$Encoder.attributeEscape($CREATEDDATEATTRIBUTENAME)"
+      size="24" /></td>
+  </tr>
+  <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.ModifiedDateAttributeNameColon'))</nobr></td>
+    <td class="value"><input name="modifieddateattributename" type="text" value="$Encoder.attributeEscape($MODIFIEDDATEATTRIBUTENAME)"
+      size="24" /></td>
+  </tr>
+  <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.IndexingDateAttributeNameColon'))</nobr></td>
+    <td class="value"><input name="indexingdateattributename" type="text" value="$Encoder.attributeEscape($INDEXINGDATEATTRIBUTENAME)"
+      size="24" /></td>
+  </tr>
+  <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.MimeTypeAttributeNameColon'))</nobr></td>
+    <td class="value"><input name="mimetypeattributename" type="text" value="$Encoder.attributeEscape($MIMETYPEATTRIBUTENAME)"
+      size="24" /></td>
+  </tr>
+
 </table>
 
 #else
@@ -66,4 +88,9 @@
 <input type="hidden" name="usemapperattachments_present" value="true"/>
 <input type="hidden" name="usemapperattachments" value="$Encoder.bodyEscape($USEMAPPERATTACHMENTS)"
/>
 <input type="hidden" name="contentattributename" value="$Encoder.attributeEscape($CONTENTATTRIBUTENAME)"
/>
+<input type="hidden" name="createddateattributename" value="$Encoder.attributeEscape($CREATEDDATEATTRIBUTENAME)"
/>
+<input type="hidden" name="modifieddateattributename" value="$Encoder.attributeEscape($MODIFIEDDATEATTRIBUTENAME)"
/>
+<input type="hidden" name="indexingdateattributename" value="$Encoder.attributeEscape($INDEXINGDATEATTRIBUTENAME)"
/>
+<input type="hidden" name="mimetypeattributename" value="$Encoder.attributeEscape($MIMETYPEATTRIBUTENAME)"
/>
+
 #end

Modified: manifoldcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/viewConfiguration.html
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/viewConfiguration.html?rev=1730033&r1=1730032&r2=1730033&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/viewConfiguration.html
(original)
+++ manifoldcf/trunk/connectors/elasticsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/elasticsearch/viewConfiguration.html
Fri Feb 12 14:50:07 2016
@@ -37,4 +37,21 @@
     <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.ContentAttributeNameColon'))</nobr></td>
     <td class="value">$Encoder.bodyEscape($CONTENTATTRIBUTENAME)</td>
   </tr>
+  <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.CreatedDateAttributeNameColon'))</nobr></td>
+    <td class="value">$Encoder.bodyEscape($CREATEDDATEATTRIBUTENAME)</td>
+  </tr>
+  <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.ModifiedDateAttributeNameColon'))</nobr></td>
+    <td class="value">$Encoder.bodyEscape($MODIFIEDDATEATTRIBUTENAME)</td>
+  </tr>
+  <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.IndexingDateAttributeNameColon'))</nobr></td>
+    <td class="value">$Encoder.bodyEscape($INDEXINGDATEATTRIBUTENAME)</td>
+  </tr>
+  <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.MimeTypeAttributeNameColon'))</nobr></td>
+    <td class="value">$Encoder.bodyEscape($MIMETYPEATTRIBUTENAME)</td>
+  </tr>
+
 </table>
\ No newline at end of file



Mime
View raw message