All Products
Search
Document Center

OpenSearch:Manage Cava configurations

Last Updated:Sep 02, 2024

Overview

OpenSearch provides Cava plug-ins on the Cava Configurations tab of the Cluster Configuration page. You can upload Cava scripts to customize functions, scorers, and summaries.

Modify a Cava configuration version

  1. On the details page of an instance, choose Configuration Management > Cluster Configuration in the left-side pane. On the Cluster Configuration page, click the Cava Configurations tab.

  2. On the Cava Configurations tab, find the Cava configuration version that you want to modify and click Modify in the Actions column.

On the Modify page, create directories or upload files.

Note:

  • Requirements of the files to be uploaded:

  • The size of the files to be uploaded can be up to 20 MB.

  • The files must be in the .cava, .json, .txt, or .xml format.

  • Requirements of directory names:

  • The names of the directories to be created can contain letters, digits, and underscores (_).

  • The directory names can be 1 to 100 characters in length.

  1. After the Cava script is uploaded, click Publish New Version.

Configuration items:

  • cava_alloc_size_limit: the maximum memory that can be allocated for queries. You can leave this parameter empty to use the default value.

  • cava_compile_thread_num

  • cava_config

  • cava_loop_and_func_limit

  • cava_max_variable_count

  • cava_module_cache_size: the maximum number of source code blocks that are passed to the cache query. If the threshold value is exceeded, the Least Recently Used (LRU) algorithm is used. You can leave this parameter empty to use the default value.

  • enable_cava: specifies whether to enable the Cava feature.

4. After the Cava configuration version is published, the system automatically generates a Cava configuration version.

5. Go to the Cluster Management page, and click Update in the Configuration Information section. In the Update Cluster Configuration panel, select and apply a Cava configuration version.

6. View the update progress on the Change History page in the Extended Features module.

After the preceding finite-state machine (FSM) process is complete, the Cava configuration file can be used for queries in OpenSearch.

Delete a Cava configuration version

You can delete a Cava configuration version in the Unused state on the Cava Configurations tab of the Cluster Configuration page.

Usage notes

  • After a Cava Configuration version is published, you can no longer change the configuration content.

  • You can modify a published Cava configuration version to generate a new Cava configuration version.

  • When you modify a published Cava configuration version, the system saves only the latest draft version.

  • You can delete only Cava configuration versions that are in the Unused state. You cannot delete Cava configuration versions that are in the In Use state.