|
24 | 24 | import org.apache.lucene.search.Query;
|
25 | 25 | import org.elasticsearch.ElasticsearchParseException;
|
26 | 26 | import org.elasticsearch.common.geo.ShapeRelation;
|
27 |
| -import org.elasticsearch.common.logging.DeprecationCategory; |
28 |
| -import org.elasticsearch.common.logging.DeprecationLogger; |
29 | 27 | import org.elasticsearch.common.lucene.BytesRefs;
|
30 | 28 | import org.elasticsearch.common.time.DateFormatter;
|
31 | 29 | import org.elasticsearch.common.time.DateFormatters;
|
|
35 | 33 | import org.elasticsearch.core.Nullable;
|
36 | 34 | import org.elasticsearch.core.TimeValue;
|
37 | 35 | import org.elasticsearch.index.IndexVersion;
|
38 |
| -import org.elasticsearch.index.IndexVersions; |
39 | 36 | import org.elasticsearch.index.fielddata.FieldDataContext;
|
40 | 37 | import org.elasticsearch.index.fielddata.IndexFieldData;
|
41 | 38 | import org.elasticsearch.index.fielddata.IndexNumericFieldData.NumericType;
|
|
78 | 75 | /** A {@link FieldMapper} for dates. */
|
79 | 76 | public final class DateFieldMapper extends FieldMapper {
|
80 | 77 |
|
81 |
| - private static final DeprecationLogger DEPRECATION_LOGGER = DeprecationLogger.getLogger(DateFieldMapper.class); |
82 | 78 | private static final Logger logger = LogManager.getLogger(DateFieldMapper.class);
|
83 | 79 |
|
84 | 80 | public static final String CONTENT_TYPE = "date";
|
@@ -340,20 +336,7 @@ private Long parseNullValue(DateFieldType fieldType) {
|
340 | 336 | try {
|
341 | 337 | return fieldType.parse(nullValue.getValue());
|
342 | 338 | } catch (Exception e) {
|
343 |
| - if (indexCreatedVersion.onOrAfter(IndexVersions.V_8_0_0)) { |
344 |
| - throw new MapperParsingException("Error parsing [null_value] on field [" + leafName() + "]: " + e.getMessage(), e); |
345 |
| - } else { |
346 |
| - DEPRECATION_LOGGER.warn( |
347 |
| - DeprecationCategory.MAPPINGS, |
348 |
| - "date_mapper_null_field", |
349 |
| - "Error parsing [" |
350 |
| - + nullValue.getValue() |
351 |
| - + "] as date in [null_value] on field [" |
352 |
| - + leafName() |
353 |
| - + "]); [null_value] will be ignored" |
354 |
| - ); |
355 |
| - return null; |
356 |
| - } |
| 339 | + throw new MapperParsingException("Error parsing [null_value] on field [" + leafName() + "]: " + e.getMessage(), e); |
357 | 340 | }
|
358 | 341 | }
|
359 | 342 |
|
|
0 commit comments