|
|
@@ -18,10 +18,8 @@
|
|
|
*/
|
|
|
package org.elasticsearch.search.lookup;
|
|
|
|
|
|
-import org.apache.logging.log4j.LogManager;
|
|
|
import org.apache.lucene.index.LeafReaderContext;
|
|
|
import org.elasticsearch.ExceptionsHelper;
|
|
|
-import org.elasticsearch.common.logging.DeprecationLogger;
|
|
|
import org.elasticsearch.index.fielddata.IndexFieldData;
|
|
|
import org.elasticsearch.index.fielddata.ScriptDocValues;
|
|
|
import org.elasticsearch.index.mapper.MappedFieldType;
|
|
|
@@ -38,12 +36,6 @@ import java.util.function.Function;
|
|
|
|
|
|
public class LeafDocLookup implements Map<String, ScriptDocValues<?>> {
|
|
|
|
|
|
- private static final DeprecationLogger DEPRECATION_LOGGER
|
|
|
- = new DeprecationLogger(LogManager.getLogger(LeafDocLookup.class));
|
|
|
- static final String TYPES_DEPRECATION_KEY = "type-field-doc-lookup";
|
|
|
- static final String TYPES_DEPRECATION_MESSAGE =
|
|
|
- "[types removal] Looking up doc types [_type] in scripts is deprecated.";
|
|
|
-
|
|
|
private final Map<String, ScriptDocValues<?>> localCacheFieldData = new HashMap<>(4);
|
|
|
|
|
|
private final MapperService mapperService;
|
|
|
@@ -74,10 +66,6 @@ public class LeafDocLookup implements Map<String, ScriptDocValues<?>> {
|
|
|
|
|
|
@Override
|
|
|
public ScriptDocValues<?> get(Object key) {
|
|
|
- // deprecate _type
|
|
|
- if ("_type".equals(key)) {
|
|
|
- DEPRECATION_LOGGER.deprecatedAndMaybeLog(TYPES_DEPRECATION_KEY, TYPES_DEPRECATION_MESSAGE);
|
|
|
- }
|
|
|
// assume its a string...
|
|
|
String fieldName = key.toString();
|
|
|
ScriptDocValues<?> scriptValues = localCacheFieldData.get(fieldName);
|