Fix sparse vector test
This commit is contained in:
parent
caf143f4a5
commit
0e2a9b4ac7
|
@ -255,7 +255,7 @@ public abstract class MapperTestCase extends MapperServiceTestCase {
|
|||
return true;
|
||||
}
|
||||
|
||||
public final void testDeprecatedBoost() throws IOException {
|
||||
public void testDeprecatedBoost() throws IOException {
|
||||
assumeTrue("Does not support [boost] parameter", supportsOrIgnoresBoost());
|
||||
createMapperService(fieldMapping(b -> {
|
||||
minimalMapping(b);
|
||||
|
|
|
@ -59,6 +59,20 @@ public class SparseVectorFieldMapperTests extends MapperTestCase {
|
|||
builder.startObject().field("1", 1).endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testDeprecatedBoost() throws IOException {
|
||||
assumeTrue("Does not support [boost] parameter", supportsOrIgnoresBoost());
|
||||
createMapperService(fieldMapping(b -> {
|
||||
minimalMapping(b);
|
||||
b.field("boost", 2.0);
|
||||
}));
|
||||
String type = typeName();
|
||||
String[] warnings = new String[] {
|
||||
"The [sparse_vector] field type is deprecated and will be removed in 8.0.",
|
||||
"Parameter [boost] has no effect on type [" + type + "] and will be removed in future" };
|
||||
allowedWarnings(warnings);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Collection<Plugin> getPlugins() {
|
||||
return Collections.singletonList(new Vectors());
|
||||
|
|
Loading…
Reference in New Issue