Skip to content

Commit f96a1a8

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent 770ad5d commit f96a1a8

File tree

3 files changed

+7
-21
lines changed

3 files changed

+7
-21
lines changed

test/framework/src/main/java/org/elasticsearch/datageneration/matchers/source/FieldSpecificMatcher.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ class MatchOnlyTextMatcher implements FieldSpecificMatcher {
610610
private final XContentBuilder expectedMappings;
611611
private final Settings.Builder expectedSettings;
612612

613-
MatchOnlyTextMatcher (
613+
MatchOnlyTextMatcher(
614614
XContentBuilder actualMappings,
615615
Settings.Builder actualSettings,
616616
XContentBuilder expectedMappings,
@@ -637,7 +637,7 @@ public MatchResult match(
637637
if (actualNormalized.equals(expectedNormalized)) {
638638
return MatchResult.match();
639639
}
640-
//
640+
//
641641
var multiFields = (Map<String, Object>) getMappingParameter("fields", actualMapping, expectedMapping);
642642
if (multiFields != null) {
643643
var keywordMatcher = new KeywordMatcher(actualMappings, actualSettings, expectedMappings, expectedSettings);
@@ -669,7 +669,6 @@ private Set<Object> normalize(List<Object> values) {
669669
}
670670
}
671671

672-
673672
class TextMatcher implements FieldSpecificMatcher {
674673
private final XContentBuilder actualMappings;
675674
private final Settings.Builder actualSettings;

test/framework/src/main/java/org/elasticsearch/datageneration/queries/LeafQueryGenerator.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ public List<QueryBuilder> generate(Map<String, Object> fieldMapping, String path
5151
return List.of();
5252
}
5353
}
54-
return List.of(
55-
QueryBuilders.termQuery(path, value),
56-
QueryBuilders.matchQuery(path, value)
57-
);
54+
return List.of(QueryBuilders.termQuery(path, value), QueryBuilders.matchQuery(path, value));
5855
}
5956
}
6057

@@ -78,10 +75,7 @@ public List<QueryBuilder> generate(Map<String, Object> fieldMapping, String path
7875
}
7976
}
8077

81-
return List.of(
82-
QueryBuilders.matchQuery(path, value),
83-
QueryBuilders.matchPhraseQuery(path, value)
84-
);
78+
return List.of(QueryBuilders.matchQuery(path, value), QueryBuilders.matchPhraseQuery(path, value));
8579
}
8680
}
8781

@@ -94,10 +88,7 @@ public List<QueryBuilder> generate(Map<String, Object> fieldMapping, String path
9488
return List.of(QueryBuilders.matchQuery(path, value));
9589
}
9690

97-
return List.of(
98-
QueryBuilders.matchQuery(path, value),
99-
QueryBuilders.matchPhraseQuery(path, value)
100-
);
91+
return List.of(QueryBuilders.matchQuery(path, value), QueryBuilders.matchPhraseQuery(path, value));
10192
}
10293
}
10394

test/framework/src/main/java/org/elasticsearch/datageneration/queries/MappingPredicates.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,11 @@ private List<PathMapping> getPathMapping(String path) {
4141
}
4242

4343
public List<String> getNestedPathPrefixes(String fullPath) {
44-
return getPathMapping(fullPath).stream()
45-
.filter(pm -> "nested".equals(pm.mapping().get("type")))
46-
.map(PathMapping::path)
47-
.toList();
44+
return getPathMapping(fullPath).stream().filter(pm -> "nested".equals(pm.mapping().get("type"))).map(PathMapping::path).toList();
4845
}
4946

5047
public boolean inNestedContext(String fullPath) {
51-
return getPathMapping(fullPath).stream()
52-
.anyMatch(pm -> "nested".equals(pm.mapping().get("type")));
48+
return getPathMapping(fullPath).stream().anyMatch(pm -> "nested".equals(pm.mapping().get("type")));
5349
}
5450

5551
@SuppressWarnings("unchecked")

0 commit comments

Comments
 (0)