|
@@ -50,8 +50,6 @@ import org.elasticsearch.common.bytes.BytesReference;
|
|
|
import org.elasticsearch.common.collect.Tuple;
|
|
|
import org.elasticsearch.common.hash.MurmurHash3;
|
|
|
import org.elasticsearch.common.io.stream.OutputStreamStreamOutput;
|
|
|
-import org.elasticsearch.common.logging.DeprecationLogger;
|
|
|
-import org.elasticsearch.common.logging.Loggers;
|
|
|
import org.elasticsearch.common.settings.Setting;
|
|
|
import org.elasticsearch.common.settings.Settings;
|
|
|
import org.elasticsearch.common.xcontent.XContentBuilder;
|
|
@@ -97,13 +95,9 @@ import static org.elasticsearch.index.query.AbstractQueryBuilder.parseInnerQuery
|
|
|
public class PercolatorFieldMapper extends FieldMapper {
|
|
|
|
|
|
static final XContentType QUERY_BUILDER_CONTENT_TYPE = XContentType.SMILE;
|
|
|
- @Deprecated
|
|
|
- static final Setting<Boolean> INDEX_MAP_UNMAPPED_FIELDS_AS_STRING_SETTING = Setting.boolSetting(
|
|
|
- "index.percolator.map_unmapped_fields_as_string", false, Setting.Property.IndexScope, Setting.Property.Deprecated);
|
|
|
static final Setting<Boolean> INDEX_MAP_UNMAPPED_FIELDS_AS_TEXT_SETTING = Setting.boolSetting(
|
|
|
"index.percolator.map_unmapped_fields_as_text", false, Setting.Property.IndexScope);
|
|
|
static final String CONTENT_TYPE = "percolator";
|
|
|
- private static final DeprecationLogger DEPRECATION_LOGGER = new DeprecationLogger(Loggers.getLogger(PercolatorFieldMapper.class));
|
|
|
private static final FieldType FIELD_TYPE = new FieldType();
|
|
|
|
|
|
static final byte FIELD_VALUE_SEPARATOR = 0; // nul code point
|
|
@@ -359,20 +353,7 @@ public class PercolatorFieldMapper extends FieldMapper {
|
|
|
}
|
|
|
|
|
|
private static boolean getMapUnmappedFieldAsText(Settings indexSettings) {
|
|
|
- if (INDEX_MAP_UNMAPPED_FIELDS_AS_TEXT_SETTING.exists(indexSettings) &&
|
|
|
- INDEX_MAP_UNMAPPED_FIELDS_AS_STRING_SETTING.exists(indexSettings)) {
|
|
|
- throw new IllegalArgumentException("Either specify [" + INDEX_MAP_UNMAPPED_FIELDS_AS_STRING_SETTING.getKey() +
|
|
|
- "] or [" + INDEX_MAP_UNMAPPED_FIELDS_AS_TEXT_SETTING.getKey() + "] setting, not both");
|
|
|
- }
|
|
|
-
|
|
|
- if (INDEX_MAP_UNMAPPED_FIELDS_AS_STRING_SETTING.exists(indexSettings)) {
|
|
|
- DEPRECATION_LOGGER.deprecatedAndMaybeLog(INDEX_MAP_UNMAPPED_FIELDS_AS_STRING_SETTING.getKey(),
|
|
|
- "The [" + INDEX_MAP_UNMAPPED_FIELDS_AS_STRING_SETTING.getKey() +
|
|
|
- "] setting is deprecated in favour for the [" + INDEX_MAP_UNMAPPED_FIELDS_AS_TEXT_SETTING.getKey() + "] setting");
|
|
|
- return INDEX_MAP_UNMAPPED_FIELDS_AS_STRING_SETTING.get(indexSettings);
|
|
|
- } else {
|
|
|
- return INDEX_MAP_UNMAPPED_FIELDS_AS_TEXT_SETTING.get(indexSettings);
|
|
|
- }
|
|
|
+ return INDEX_MAP_UNMAPPED_FIELDS_AS_TEXT_SETTING.get(indexSettings);
|
|
|
}
|
|
|
|
|
|
@Override
|