Skip to content

Commit 5d4d040

Browse files
committed
Spotless
1 parent 624133e commit 5d4d040

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

x-pack/plugin/inference/src/test/java/org/elasticsearch/action/fieldcaps/FieldCapabilitiesRequestSemanticIndexFilterTests.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
package org.elasticsearch.action.fieldcaps;
99

10+
import org.apache.lucene.search.join.ScoreMode;
1011
import org.elasticsearch.action.ActionRequestValidationException;
1112
import org.elasticsearch.index.query.BoolQueryBuilder;
1213
import org.elasticsearch.index.query.BoostingQueryBuilder;
@@ -19,7 +20,6 @@
1920
import org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder;
2021
import org.elasticsearch.test.ESTestCase;
2122
import org.elasticsearch.xpack.inference.queries.SemanticQueryBuilder;
22-
import org.apache.lucene.search.join.ScoreMode;
2323

2424
import static org.hamcrest.Matchers.containsString;
2525
import static org.hamcrest.Matchers.notNullValue;
@@ -70,10 +70,7 @@ public void testValidateWithRandomCompoundQueryContainingSemantic() {
7070
}
7171

7272
private static SemanticQueryBuilder randomSemanticQuery() {
73-
return new SemanticQueryBuilder(
74-
randomAlphaOfLength(5),
75-
randomAlphaOfLength(10)
76-
);
73+
return new SemanticQueryBuilder(randomAlphaOfLength(5), randomAlphaOfLength(10));
7774
}
7875

7976
private static QueryBuilder randomNonSemanticQuery() {
@@ -120,11 +117,7 @@ private static QueryBuilder randomCompoundQueryWithSemantic(int depth) {
120117
}
121118
yield disMax;
122119
}
123-
case 2 -> new NestedQueryBuilder(
124-
randomAlphaOfLength(5),
125-
randomCompoundQueryWithSemantic(depth - 1),
126-
ScoreMode.Max
127-
);
120+
case 2 -> new NestedQueryBuilder(randomAlphaOfLength(5), randomCompoundQueryWithSemantic(depth - 1), ScoreMode.Max);
128121
case 3 -> {
129122
boolean positiveSemanticQuery = randomBoolean();
130123
QueryBuilder semanticQuery = randomCompoundQueryWithSemantic(depth - 1);

0 commit comments

Comments
 (0)