From 4ba36b0144ee500c31a0832db5636cbd317bc295 Mon Sep 17 00:00:00 2001 From: yuye-aws Date: Sat, 27 Apr 2024 20:37:26 +0800 Subject: [PATCH] add comment Signed-off-by: yuye-aws --- .../opensearch/neuralsearch/processor/TextChunkingProcessor.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/opensearch/neuralsearch/processor/TextChunkingProcessor.java b/src/main/java/org/opensearch/neuralsearch/processor/TextChunkingProcessor.java index 730348ecc..300d3c91c 100644 --- a/src/main/java/org/opensearch/neuralsearch/processor/TextChunkingProcessor.java +++ b/src/main/java/org/opensearch/neuralsearch/processor/TextChunkingProcessor.java @@ -151,6 +151,7 @@ private int getMaxTokenCount(final Map sourceAndMetadataMap) { } // if the index is specified in the metadata, read maxTokenCount from the index setting String maxTokenCountString = indexMetadata.getSettings().get("index.analyze.max_token_count"); + // if maxTokenCount is not specified in the index, return the default setting if (Objects.isNull(maxTokenCountString)) { return IndexSettings.MAX_TOKEN_COUNT_SETTING.get(environment.settings()); }