فهرست منبع

Merge pull request #16948 from dadoonet/pr/16910-deprecate-mapper-attachments

Deprecate mapper-attachments plugin
David Pilato 9 سال پیش
والد
کامیت
ebbc3ccab2

+ 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);