Skip to content

Commit

Permalink
GEO: Comment that we are not removing warning
Browse files Browse the repository at this point in the history
Change the warning message when you send a multifield under a geo field.
We *still* ignore the multifields but we do not plan to remove them. It
isn't worth breaking anyone.
  • Loading branch information
nik9000 committed Jan 31, 2025
1 parent 67c2f41 commit 771e78e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,14 @@ private FieldValues<Geometry> scriptValues() {
@Override
public GeoShapeWithDocValuesFieldMapper build(MapperBuilderContext context) {
if (multiFieldsBuilder.hasMultiFields()) {
/*
* We have no plans to fail on multifields because it isn't worth breaking
* even the tiny fraction of users.
*/
DEPRECATION_LOGGER.warn(
DeprecationCategory.MAPPINGS,
"geo_shape_multifields",
"Adding multifields to [geo_shape] mappers has no effect and will be forbidden in future"
"Adding multifields to [geo_shape] mappers has no effect"
);
}
GeometryParser geometryParser = new GeometryParser(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,14 @@ private static CartesianPoint parseNullValue(Object nullValue, boolean ignoreZVa
@Override
public FieldMapper build(MapperBuilderContext context) {
if (multiFieldsBuilder.hasMultiFields()) {
/*
* We have no plans to fail on multifields because it isn't worth breaking
* even the tiny fraction of users.
*/
DEPRECATION_LOGGER.warn(
DeprecationCategory.MAPPINGS,
"point_multifields",
"Adding multifields to [point] mappers has no effect and will be forbidden in future"
"Adding multifields to [point] mappers has no effect"
);
}
CartesianPointParser parser = new CartesianPointParser(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,14 @@ protected Parameter<?>[] getParameters() {
@Override
public ShapeFieldMapper build(MapperBuilderContext context) {
if (multiFieldsBuilder.hasMultiFields()) {
/*
* We have no plans to fail on multifields because it isn't worth breaking
* even the tiny fraction of users.
*/
DEPRECATION_LOGGER.warn(
DeprecationCategory.MAPPINGS,
"shape_multifields",
"Adding multifields to [shape] mappers has no effect and will be forbidden in future"
"Adding multifields to [shape] mappers has no effect"
);
}
GeometryParser geometryParser = new GeometryParser(
Expand Down

0 comments on commit 771e78e

Please sign in to comment.