Skip to content

Commit 1084b38

Browse files
author
Svilen Mihaylov
committed
Remove "use_field_mapping" in FieldFormat
1 parent ce990a5 commit 1084b38

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

server/src/main/java/org/elasticsearch/search/fetch/subphase/FieldAndFormat.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
import org.elasticsearch.common.io.stream.StreamInput;
1313
import org.elasticsearch.common.io.stream.StreamOutput;
1414
import org.elasticsearch.common.io.stream.Writeable;
15-
import org.elasticsearch.common.logging.DeprecationLogger;
16-
import org.elasticsearch.core.CheckedFunction;
1715
import org.elasticsearch.core.Nullable;
1816
import org.elasticsearch.xcontent.ConstructingObjectParser;
1917
import org.elasticsearch.xcontent.ParseField;
@@ -30,9 +28,6 @@
3028
* display values of this field.
3129
*/
3230
public final class FieldAndFormat implements Writeable, ToXContentObject {
33-
private static final String USE_DEFAULT_FORMAT = "use_field_mapping";
34-
private static final DeprecationLogger DEPRECATION_LOGGER = DeprecationLogger.getLogger(FetchDocValuesPhase.class);
35-
3631
public static final ParseField FIELD_FIELD = new ParseField("field");
3732
public static final ParseField FORMAT_FIELD = new ParseField("format");
3833
public static final ParseField INCLUDE_UNMAPPED_FIELD = new ParseField("include_unmapped");
@@ -48,28 +43,6 @@ public final class FieldAndFormat implements Writeable, ToXContentObject {
4843
PARSER.declareBoolean(ConstructingObjectParser.optionalConstructorArg(), INCLUDE_UNMAPPED_FIELD);
4944
}
5045

51-
private static CheckedFunction<XContentParser, String, IOException> ignoreUseFieldMappingStringParser() {
52-
return (p) -> {
53-
if (p.currentToken() == XContentParser.Token.VALUE_NULL) {
54-
return null;
55-
} else {
56-
String text = p.text();
57-
if (text.equals(USE_DEFAULT_FORMAT)) {
58-
DEPRECATION_LOGGER.compatibleCritical(
59-
"explicit_default_format",
60-
"["
61-
+ USE_DEFAULT_FORMAT
62-
+ "] is a special format that was only used to "
63-
+ "ease the transition to 7.x. It has become the default and shouldn't be set explicitly anymore."
64-
);
65-
return null;
66-
} else {
67-
return text;
68-
}
69-
}
70-
};
71-
}
72-
7346
/**
7447
* Parse a {@link FieldAndFormat} from some {@link XContent}.
7548
*/

0 commit comments

Comments
 (0)