All Products
Search
Document Center

OpenSearch:How to use algorithm module parameters

Last Updated:Apr 01, 2026

To use OpenSearch's algorithm features in search requests, pass the required custom parameters through the SDK for Java. This page lists the parameters for each algorithm module and shows how to set them in your code.

All code examples are pseudocode.

Query analysis

Query analysis powers text vectorization and named entity recognition (NER).

ParameterRequiredDescription
raw_queryYesThe original search query string. Used by the text vectorization and NER models.
image
...
// Create a SearchParams object.
SearchParams searchParams = new SearchParams(config);
searchParams.setQuery("default:'OpenSearch'");

// Set the raw_query parameter.
Map<String, String> customParam = new HashMap<>();
customParam.put("raw_query", "OpenSearch");
searchParams.setCustomParam(customParam);

// Run the query and return the results as a SearchResult object.
SearchResult execute = searcherClient.execute(searchParams);
...