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

Deprecate mapper-attachments plugin
This commit is contained in:
David Pilato 2016-03-04 13:33:08 +01:00
commit ebbc3ccab2
1 changed files with 8 additions and 0 deletions

View File

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