Skip to content

Commit

Permalink
Fix spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed Feb 15, 2024
1 parent 02b7cc4 commit 7e98736
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,7 @@ public TestTaskSettings(StreamInput in) throws IOException {
}

@Override
public void writeTo(StreamOutput out) throws IOException {
}
public void writeTo(StreamOutput out) throws IOException {}

@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,10 @@ private static void addSemanticTextInferenceResults(

private static Map<String, Object> modelSettingsMap() {
return Map.of(
ModelSettings.TASK_TYPE_FIELD.getPreferredName(), TaskType.SPARSE_EMBEDDING.toString(),
ModelSettings.INFERENCE_ID_FIELD.getPreferredName(), randomAlphaOfLength(8)
ModelSettings.TASK_TYPE_FIELD.getPreferredName(),
TaskType.SPARSE_EMBEDDING.toString(),
ModelSettings.INFERENCE_ID_FIELD.getPreferredName(),
randomAlphaOfLength(8)
);
}

Expand Down Expand Up @@ -487,10 +489,7 @@ private static Query generateNestedTermSparseVectorQuery(NestedLookup nestedLook
BooleanQuery.Builder queryBuilder = new BooleanQuery.Builder();
for (String token : tokens) {
queryBuilder.add(
new BooleanClause(
new TermQuery(new Term(path + "." + INFERENCE_CHUNKS_RESULTS, token)),
BooleanClause.Occur.MUST
)
new BooleanClause(new TermQuery(new Term(path + "." + INFERENCE_CHUNKS_RESULTS, token)), BooleanClause.Occur.MUST)
);
}
queryBuilder.add(new BooleanClause(mapper.nestedTypeFilter(), BooleanClause.Occur.FILTER));
Expand All @@ -505,11 +504,7 @@ private static void assertValidChildDoc(
) {
assertEquals(expectedParent, childDoc.getParent());
visitedChildDocs.add(
new VisitedChildDocInfo(
childDoc.getPath(),
childDoc.getFields(childDoc.getPath() + "." + INFERENCE_CHUNKS_RESULTS)
.size()
)
new VisitedChildDocInfo(childDoc.getPath(), childDoc.getFields(childDoc.getPath() + "." + INFERENCE_CHUNKS_RESULTS).size())
);
}

Expand Down

0 comments on commit 7e98736

Please sign in to comment.