Skip to content

Commit

Permalink
Update src/main/java/org/opensearch/neuralsearch/util/ProcessorDocume…
Browse files Browse the repository at this point in the history
…ntUtils.java

Co-authored-by: Martin Gaievski <gaievski@amazon.com>
Signed-off-by: zane-neo <zaniu@amazon.com>
  • Loading branch information
zane-neo and martin-gaievski authored Jun 4, 2024
1 parent bb82974 commit 57306bf
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ private static void validateMapTypeValue(
final Environment environment,
final boolean allowEmpty
) {
if (sourceValue == null) return; // allow map type value to be null.
// allow map type value to be null
if (Objects.isNull(sourceValue) {
return;
}
validateDepth(sourceKey, depth, indexName, clusterService, environment);
if (!(fieldMap instanceof Map)) { // source value is map type means configuration has to be map type
throw new IllegalArgumentException(
Expand Down

0 comments on commit 57306bf

Please sign in to comment.