Skip to content

Commit

Permalink
Update server/src/main/java/org/elasticsearch/index/mapper/DynamicTem…
Browse files Browse the repository at this point in the history
…plate.java

Co-authored-by: Felix Barnsteiner <felixbarny@users.noreply.github.com>
  • Loading branch information
axw and felixbarny authored Dec 9, 2023
1 parent 7d2a5a4 commit e50dcf3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,9 @@ static DynamicTemplate parse(String name, Map<String, Object> conf) throws Mappe
// unmatch_mapping_type filters down the matched mapping types.
if (unmatchMappingType != null) {
final Set<XContentFieldType> unmatchSet = Set.of(parseMatchMappingType(unmatchMappingType));
Set<XContentFieldType> matchSet = new LinkedHashSet<XContentFieldType>(Arrays.asList(xContentFieldTypes));
matchSet.removeAll(unmatchSet);
xContentFieldTypes = matchSet.toArray(XContentFieldType[]::new);
xContentFieldTypes = Stream.of(xContentFieldTypes)
.filter(Predicate.not(unmatchSet::contains))
.toArray(XContentFieldType[]::new);
}

// If match_mapping_type is "*", filter down matched mapping types
Expand Down

0 comments on commit e50dcf3

Please sign in to comment.