From 17aabaed155a9257e0a46a1d2847efd88735c9d3 Mon Sep 17 00:00:00 2001 From: Alan Woodward Date: Fri, 18 Sep 2020 16:44:40 +0100 Subject: [PATCH] Fix warning on boost docs and warning message on non-implementing fieldmappers --- docs/reference/mapping/params/boost.asciidoc | 1 + .../org/elasticsearch/index/mapper/ParametrizedFieldMapper.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/reference/mapping/params/boost.asciidoc b/docs/reference/mapping/params/boost.asciidoc index 5366a1d586a..1cfd62d016e 100644 --- a/docs/reference/mapping/params/boost.asciidoc +++ b/docs/reference/mapping/params/boost.asciidoc @@ -21,6 +21,7 @@ PUT my-index-000001 } } -------------------------------------------------- +// TEST[warning:Parameter [boost] on field [title] is deprecated and will be removed in 8.0] <1> Matches on the `title` field will have twice the weight as those on the `content` field, which has the default `boost` of `1.0`. diff --git a/server/src/main/java/org/elasticsearch/index/mapper/ParametrizedFieldMapper.java b/server/src/main/java/org/elasticsearch/index/mapper/ParametrizedFieldMapper.java index c915bbddfd1..9b7fec08b9d 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/ParametrizedFieldMapper.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/ParametrizedFieldMapper.java @@ -591,7 +591,7 @@ public abstract class ParametrizedFieldMapper extends FieldMapper { // made no sense; if we've got here, that means that they're not declared on a current mapper, // and so we emit a deprecation warning rather than failing a previously working mapping. private static final Set DEPRECATED_PARAMS - = new HashSet<>(Arrays.asList("store", "meta", "index", "doc_values", "boost", "index_options", "similarity")); + = new HashSet<>(Arrays.asList("store", "meta", "index", "doc_values", "index_options", "similarity")); private static boolean isDeprecatedParameter(String propName, Version indexCreatedVersion) { return DEPRECATED_PARAMS.contains(propName);