瀏覽代碼

Deprecate mapper-attachments plugin

See #16910
David Pilato 9 年之前
父節點
當前提交
f97ce3c728

+ 8 - 0
plugins/mapper-attachments/src/main/java/org/elasticsearch/mapper/attachments/MapperAttachmentsPlugin.java

@@ -19,12 +19,19 @@
 
 package org.elasticsearch.mapper.attachments;
 
+import org.elasticsearch.common.logging.DeprecationLogger;
+import org.elasticsearch.common.logging.ESLogger;
+import org.elasticsearch.common.logging.ESLoggerFactory;
 import org.elasticsearch.common.settings.SettingsModule;
 import org.elasticsearch.indices.IndicesModule;
 import org.elasticsearch.plugins.Plugin;
 
 public class MapperAttachmentsPlugin extends Plugin {
 
+
+    private static ESLogger logger = ESLoggerFactory.getLogger("mapper.attachment");
+    private static DeprecationLogger deprecationLogger = new DeprecationLogger(logger);
+
     @Override
     public String name() {
         return "mapper-attachments";
@@ -36,6 +43,7 @@ public class MapperAttachmentsPlugin extends Plugin {
     }
 
     public void onModule(SettingsModule settingsModule) {
+        deprecationLogger.deprecated("[mapper-attachments] plugin has been deprecated and will be replaced by [ingest-attachment] plugin.");
         settingsModule.registerSetting(AttachmentMapper.INDEX_ATTACHMENT_DETECT_LANGUAGE_SETTING);
         settingsModule.registerSetting(AttachmentMapper.INDEX_ATTACHMENT_IGNORE_ERRORS_SETTING);
         settingsModule.registerSetting(AttachmentMapper.INDEX_ATTACHMENT_INDEXED_CHARS_SETTING);