File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
server/src/main/java/org/elasticsearch/index/mapper Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -223,11 +223,13 @@ Set<String> getMatchingFieldNames(String pattern) {
223223 if (dynamicFieldTypes .isEmpty () == false ) {
224224 // check if any dynamic field roots match the pattern
225225 String [] subparts = pattern .split ("\\ ." , 2 );
226- if (subparts .length > 1 && dynamicFieldTypes . containsKey ( subparts [ 0 ]) ) {
226+ if (subparts .length > 1 ) {
227227 DynamicFieldType dft = dynamicFieldTypes .get (subparts [0 ]);
228- Set <String > childNames = dft .getChildFieldNames (subparts [1 ]);
229- if (childNames != null ) {
230- return childNames .stream ().map (childName -> subparts [0 ] + "." + childName ).collect (Collectors .toUnmodifiableSet ());
228+ if (dft != null ) {
229+ Set <String > childNames = dft .getChildFieldNames (subparts [1 ]);
230+ if (childNames != null ) {
231+ return childNames .stream ().map (childName -> subparts [0 ] + "." + childName ).collect (Collectors .toUnmodifiableSet ());
232+ }
231233 }
232234 }
233235 }
You can’t perform that action at this time.
0 commit comments