diff --git a/src/main/java/org/opensearch/neuralsearch/processor/TextChunkingProcessor.java b/src/main/java/org/opensearch/neuralsearch/processor/TextChunkingProcessor.java index 0d9d26f42..555310627 100644 --- a/src/main/java/org/opensearch/neuralsearch/processor/TextChunkingProcessor.java +++ b/src/main/java/org/opensearch/neuralsearch/processor/TextChunkingProcessor.java @@ -246,17 +246,11 @@ private int getChunkStringCountFromMap(Map sourceAndMetadataMap, List sourceObjectList = (List) sourceObject; for (Object source : sourceObjectList) { if (source instanceof Map) { - chunkStringCount += getChunkStringCountFromMap( - (Map) source, - (Map) targetKey - ); + chunkStringCount += getChunkStringCountFromMap((Map) source, (Map) targetKey); } } } else if (sourceObject instanceof Map) { - chunkStringCount += getChunkStringCountFromMap( - (Map) sourceObject, - (Map) targetKey - ); + chunkStringCount += getChunkStringCountFromMap((Map) sourceObject, (Map) targetKey); } } else { // chunk the object when target key is of leaf type (null, string and list of string)