diff --git a/src/main/java/org/opensearch/neuralsearch/processor/DocumentChunkingProcessor.java b/src/main/java/org/opensearch/neuralsearch/processor/DocumentChunkingProcessor.java index e0575e2b9..7b3bc3024 100644 --- a/src/main/java/org/opensearch/neuralsearch/processor/DocumentChunkingProcessor.java +++ b/src/main/java/org/opensearch/neuralsearch/processor/DocumentChunkingProcessor.java @@ -153,8 +153,7 @@ private void validateContent(Object content, String inputField) { ); } } - } - if (!(content instanceof String)) { + } else if (!(content instanceof String)) { throw new IllegalArgumentException( "input field [" + inputField