Skip to content

Commit f136489

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent 1760919 commit f136489

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

test/framework/src/main/java/org/elasticsearch/datageneration/datasource/MultifieldAddonHandler.java

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,15 @@ public class MultifieldAddonHandler implements DataSourceHandler {
2424
private final Map<FieldType, List<FieldType>> subfieldTypes;
2525
private final float chanceOfChildField;
2626

27-
private static final Set<FieldType> STRING_TYPES = Set.of(FieldType.TEXT, FieldType.KEYWORD, FieldType.MATCH_ONLY_TEXT, FieldType.WILDCARD);
28-
public static MultifieldAddonHandler ALL_STRING_TYPES = new MultifieldAddonHandler(STRING_TYPES.stream().collect(Collectors.toMap(t -> t, t -> STRING_TYPES.stream().filter(s -> s != t).toList())));
27+
private static final Set<FieldType> STRING_TYPES = Set.of(
28+
FieldType.TEXT,
29+
FieldType.KEYWORD,
30+
FieldType.MATCH_ONLY_TEXT,
31+
FieldType.WILDCARD
32+
);
33+
public static MultifieldAddonHandler ALL_STRING_TYPES = new MultifieldAddonHandler(
34+
STRING_TYPES.stream().collect(Collectors.toMap(t -> t, t -> STRING_TYPES.stream().filter(s -> s != t).toList()))
35+
);
2936

3037
public MultifieldAddonHandler(Map<FieldType, List<FieldType>> subfieldTypes, float chanceOfChildField) {
3138
this.subfieldTypes = subfieldTypes;
@@ -77,14 +84,17 @@ private static Map<String, Object> getChildMappingForType(FieldType type, DataSo
7784
}
7885

7986
private static Map<String, Object> getMappingForType(FieldType type, DataSourceRequest.LeafMappingParametersGenerator request) {
80-
return request.dataSource().get(
81-
new DataSourceRequest.LeafMappingParametersGenerator(
82-
request.dataSource(),
83-
PLACEHOLDER_NAME,
84-
type.toString(),
85-
request.eligibleCopyToFields(),
86-
request.dynamicMapping()
87+
return request.dataSource()
88+
.get(
89+
new DataSourceRequest.LeafMappingParametersGenerator(
90+
request.dataSource(),
91+
PLACEHOLDER_NAME,
92+
type.toString(),
93+
request.eligibleCopyToFields(),
94+
request.dynamicMapping()
95+
)
8796
)
88-
).mappingGenerator().get();
97+
.mappingGenerator()
98+
.get();
8999
}
90100
}

test/framework/src/main/java/org/elasticsearch/index/mapper/BlockLoaderTestCase.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import org.elasticsearch.datageneration.datasource.DataSourceHandler;
1919
import org.elasticsearch.datageneration.datasource.DataSourceRequest;
2020
import org.elasticsearch.datageneration.datasource.DataSourceResponse;
21-
import org.elasticsearch.datageneration.datasource.MultifieldAddonHandler;
2221
import org.elasticsearch.xcontent.XContentBuilder;
2322
import org.elasticsearch.xcontent.XContentType;
2423

0 commit comments

Comments
 (0)