Skip to content

Commit

Permalink
Fix sparse vector test
Browse files Browse the repository at this point in the history
  • Loading branch information
romseygeek committed Nov 12, 2020
1 parent caf143f commit 0e2a9b4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ protected boolean supportsOrIgnoresBoost() {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,20 @@ protected void writeFieldValue(XContentBuilder builder) throws IOException {
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());
Expand Down

0 comments on commit 0e2a9b4

Please sign in to comment.