diff --git a/core/src/test/java/org/elasticsearch/index/mapper/all/SimpleAllMapperTests.java b/core/src/test/java/org/elasticsearch/index/mapper/all/SimpleAllMapperTests.java index ae1560d6608..acd0cde76d6 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/all/SimpleAllMapperTests.java +++ b/core/src/test/java/org/elasticsearch/index/mapper/all/SimpleAllMapperTests.java @@ -258,7 +258,7 @@ public class SimpleAllMapperTests extends ESSingleNodeTestCase { } tv_stored |= tv_positions || tv_payloads || tv_offsets; if (randomBoolean()) { - mappingBuilder.field("similarity", similarity = randomBoolean() ? "BM25" : null); + mappingBuilder.field("similarity", similarity = "BM25"); } mappingBuilder.endObject(); }