Overview
OpenSearch allows you to customize query configurations on the Query Configurations tab of the Cluster Configuration page.
Modify a query configuration version
On the details page of an instance, choose Configuration Management > Cluster Configuration in the left-side pane. On the Cluster Configuration page, click the Query Configurations tab.
1. On the Query Configurations tab, find a query configuration version.
2. click View or Modify in the Actions column. Then, find the configuration file that you want to view or modify, and click View or Modify in the Actions column.
3. Find the parameter that you want to modify and click Modify in the Actions column. On the Modify page, modify the parameter.
4. Click Publish New Version to generate a new 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 query configuration version.
6. View the update progress on the Change History page in the Extended Features module.
Delete a query configuration version
You can delete a query configuration version in the Unused state on the Query Configurations tab of the Cluster Configuration page.
Parameters
Query configuration file: qrs.json
Key | Value | Description |
__cluster_name | general | The custom name of the cluster. |
primary_table_name | $primary_table_name | The name of the primary table. |
qrs_connection_timeout | 750 | The query timeout period in milliseconds. |
qrs_request_compress_type | z_speed_compress | The compression type for requests forwarded to Searcher workers by Query Result Searcher (QRS) workers. You can leave this parameter empty. By default, the requests are not compressed. compress_type specifies the compression type. Default value: no_compress. Valid values:
|
qrs_return_hits_limit | 5000 | The number of documents returned for the query. |
Query configuration file: zones/general/default_biz.json
Key | Value | Description |
cava_alloc_size_limit | 40 | The maximum memory capacity that can be allocated to the Cava query level. Unit: MB. |
cava_compile_thread_num | 1 | The default value. |
cava_loop_and_func_limit | 10000 | The default value. |
cava_max_variable_count | 10000 | The default value. |
cava_module_cache_size | 256 | The 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. |
default_index | $default_index | The default index name of the query. If you do not specify an index name of a query, the default index is used. For example, query=nid:1 specifies that the nid index is queried. query='mp3' does not specify the index name of the query. In this case, the default index is used. |
default_rank_size | 1000000 | The default number of documents that are hit. |
default_rerank_size | 200 | The default number of documents to be sorted based on the fine sort expression. |
early_termination_min_wait_time | 100 | The default value. |
early_termination_trigger_result_percent | 0.85 | The default value. |
early_termination_wait_time_factor | 2 | The default value. |
enable_cava | false | Specifies whether to use Cava. |
filter_field | ||
hash_mode | $hash_mode | Example: "hash_mode": { "hash_field" : "nid", "hash_function" : "HASH" } The values in the preceding sample code specify that the HASH method and the nid field are used to calculate hash values for partitioning. |
latency_upper_limit_ms | 60 | The default value. |
latency_upper_limit_percent | 2 | The default value. |
main_online_index | $main_online_index | The default value. |
primary_table_name | $primary_table_name | The name of the primary table. |
probe_percent | 0.05 | Set probe_percent to a value greater than 0.05 to meet the requirements in prefetching scenarios. For example, the memory is unlocked. |
return_hit_rewrite_ratio | 1.2 | In the searcher, the number of sorted records, the number of serialized records, and the value of (start + hit)/partition are multiplied by a coefficient that is greater than 1 based on your business scenario. Valid values of the return_hit_rewrite_ratio parameter range between 1 and partition_count. The optimization operation is not performed for queries such as the query in which inshop is routed to a single column. |
return_hit_rewrite_threshold | 500 | If the number of records that are specified by the start and hit parameters is greater than this threshold value, the optimization is enabled. |
searcher_cache_latency_limit_ms | 1 | The Searcher cache stores only the results of queries for which the following condition is met: (rank_latency + rerank_latency) > latency_limit. If the latency of the query that is cached is high, you can use the cache to improve the performance in an effective manner. Unit: millisecond. Default value: 1. |
searcher_degrade_rank_size | 5000 | The number of documents that are hit. |
searcher_degrade_rerank_size | 100 | The number of documents to be sorted based on the fine sort expression. |
Usage notes
After a query configuration version is published, you can no longer change the configuration content.
You can modify a published query configuration version to generate a new query configuration version.
When you modify a published query configuration version, the system saves only the latest draft version.
You can delete only query configuration versions that are in the Unused state. You cannot delete query configuration versions that are in the In Use state.