Merge pull request #16948 from dadoonet/pr/16910-deprecate-mapper-attachments
Deprecate mapper-attachments plugin
This commit is contained in:
commit
ebbc3ccab2
|
@ -19,12 +19,19 @@
|
||||||
|
|
||||||
package org.elasticsearch.mapper.attachments;
|
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.common.settings.SettingsModule;
|
||||||
import org.elasticsearch.indices.IndicesModule;
|
import org.elasticsearch.indices.IndicesModule;
|
||||||
import org.elasticsearch.plugins.Plugin;
|
import org.elasticsearch.plugins.Plugin;
|
||||||
|
|
||||||
public class MapperAttachmentsPlugin extends Plugin {
|
public class MapperAttachmentsPlugin extends Plugin {
|
||||||
|
|
||||||
|
|
||||||
|
private static ESLogger logger = ESLoggerFactory.getLogger("mapper.attachment");
|
||||||
|
private static DeprecationLogger deprecationLogger = new DeprecationLogger(logger);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String name() {
|
public String name() {
|
||||||
return "mapper-attachments";
|
return "mapper-attachments";
|
||||||
|
@ -36,6 +43,7 @@ public class MapperAttachmentsPlugin extends Plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onModule(SettingsModule settingsModule) {
|
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_DETECT_LANGUAGE_SETTING);
|
||||||
settingsModule.registerSetting(AttachmentMapper.INDEX_ATTACHMENT_IGNORE_ERRORS_SETTING);
|
settingsModule.registerSetting(AttachmentMapper.INDEX_ATTACHMENT_IGNORE_ERRORS_SETTING);
|
||||||
settingsModule.registerSetting(AttachmentMapper.INDEX_ATTACHMENT_INDEXED_CHARS_SETTING);
|
settingsModule.registerSetting(AttachmentMapper.INDEX_ATTACHMENT_INDEXED_CHARS_SETTING);
|
||||||
|
|
Loading…
Reference in New Issue