Skip to content

Commit 53fc282

Browse files
fix multifield tests failure
1 parent ed12152 commit 53fc282

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

server/src/main/java/org/elasticsearch/index/mapper/FieldMapper.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,12 @@ public int getTotalFieldsCount() {
451451

452452
@Override
453453
public List<FieldMapper> getSourceFields() {
454-
return List.of(this);
454+
List<FieldMapper> fields = new ArrayList<>();
455+
for (FieldMapper mapper : builderParams.multiFields.mappers) {
456+
fields.addAll(mapper.getSourceFields());
457+
}
458+
fields.add(this);
459+
return fields;
455460
}
456461

457462
public Map<String, NamedAnalyzer> indexAnalyzers() {

0 commit comments

Comments
 (0)