diff --git a/src/main/java/org/opensearch/neuralsearch/processor/chunker/ChunkerFactory.java b/src/main/java/org/opensearch/neuralsearch/processor/chunker/ChunkerFactory.java index aab9eaa3e..6b4ddd594 100644 --- a/src/main/java/org/opensearch/neuralsearch/processor/chunker/ChunkerFactory.java +++ b/src/main/java/org/opensearch/neuralsearch/processor/chunker/ChunkerFactory.java @@ -25,8 +25,16 @@ private ChunkerFactory() {} // no instance of this factory class DelimiterChunker::new ); + /** Set of supported chunker algorithm types */ public static Set CHUNKER_ALGORITHMS = CHUNKERS_CONSTRUCTORS.keySet(); + /** + * Creates a new Chunker instance based on the specified type and parameters. + * + * @param type the type of chunker to create + * @param parameters configuration parameters for the chunker + * @return a new Chunker instance configured with the given parameters + */ public static Chunker create(final String type, final Map parameters) { Function, Chunker> chunkerConstructionFunction = CHUNKERS_CONSTRUCTORS.get(type); // chunkerConstructionFunction is not null because we have validated the type in text chunking processor