Introduction
The query configuration feature in advanced configuration lets you customize how queries are processed.
The system automatically creates the versions with the suffixes _online_config_v1, _online_config_v2, and _online_config_v3. The initial version in use is _online_config_v3.
Query configuration file: qrs.json
|
Parameter |
Value |
Description |
|
__cluster_name |
general |
The name of the cluster. This value can be customized. |
|
primary_table_name |
$primary_table_name |
The name of the primary table. |
|
qrs_connection_timeout |
750 |
The query timeout in milliseconds (ms). |
|
qrs_request_compress_type |
z_speed_compress |
Specifies whether and how to compress requests sent from the Query Result Searcher (QRS) to its sub-nodes. This parameter is optional. By default, requests are not compressed. The
|
|
qrs_return_hits_limit |
5000 |
The maximum number of documents returned by a query. |
Query configuration file: zones/general/default_biz.json
|
Parameter |
Value |
Description |
|
cava_alloc_size_limit |
40 |
The memory limit for a Cava query, in MB. |
|
cava_compile_thread_num |
1 |
Default value. |
|
cava_loop_and_func_limit |
10000 |
Default value. |
|
cava_max_variable_count |
10000 |
Default value. |
|
cava_module_cache_size |
256 |
The number of source code snippets from queries that can be cached. When this limit is exceeded, the least recently used (LRU) entry is evicted. |
|
default_index |
$default_index |
The default index to use for queries that do not specify an index name. For example, a query like |
|
default_rank_size |
1000000 |
The default number of documents to match. |
|
default_rerank_size |
200 |
The default number of documents to be included in the rerank phase. |
|
early_termination_min_wait_time |
100 |
Default value. |
|
early_termination_trigger_result_percent |
0.85 |
Default value. |
|
early_termination_wait_time_factor |
2 |
Default value. |
|
enable_cava |
false |
Specifies whether to enable Cava. |
|
filter_field |
||
|
hash_mode |
$hash_mode |
Example:
This example uses the HASH function on the |
|
latency_upper_limit_ms |
60 |
Default value. |
|
latency_upper_limit_percent |
2 |
Default value. |
|
main_online_index |
$main_online_index |
Default value. |
|
primary_table_name |
$primary_table_name |
The name of the primary table. |
|
probe_percent |
0.05 |
For scenarios that require pre-warming, such as non-locking memory, set |
|
return_hit_rewrite_ratio |
1.2 |
To minimize impact on search quality, this parameter increases the number of documents a searcher processes. The value of |
|
return_hit_rewrite_threshold |
500 |
This optimization is enabled when |
|
searcher_cache_latency_limit_ms |
1 |
Specifies the latency limit for caching. The Searcher Cache only caches results for queries where |
|
searcher_degrade_rank_size |
5000 |
The number of documents to match. |
|
searcher_degrade_rerank_size |
100 |
The number of documents to include in the rerank phase. |
The query configuration version with the _online_config_edit suffix is editable. After you edit the configuration and click Publish, the system automatically generates a new advanced configuration version with an incremented suffix, such as _online_config_v4. You can add remarks to distinguish between versions.
Add query configuration
-
To create or modify a query configuration, go to Configuration Center > Advanced Configuration > Query Configuration.
1.1. In Advanced Configuration, add a query configuration. The setup process is the same as for a dictionary configuration.
The Configuration Center > Advanced Configuration > Query Configuration page lists all query configuration versions. The Actions column provides options to edit, view, or delete each version.
1.2. You must first select to edit or view a version to access its configuration files.
The query configuration file list contains the zones directory and the qrs.json file. To open the configuration page, click Edit next to qrs.json.
1.3. To modify a parameter, find it in the list and click Edit in the Actions column.
1.4. After you finish editing, click Publish to create a new version.
After you publish the configuration, the system adds a new query configuration version to the list. Its version name suffix is incremented (for example, _online_config_v4), and its status is "unused".
-
Apply the configuration online
On the O&M Management page, click Configuration Update, select the online configuration, find the query configuration version that you just published, select the destination cluster, and then click OK.
Note: You must select a query configuration version (the latest is chosen by default) and a destination cluster. You can select multiple destination clusters, but none are selected by default.
-
O&M Management
On the O&M Management list page, you can view the current Effective Query Configuration Version, Latest Query Configuration Version, Effective Dictionary Configuration Version, and Latest Dictionary Configuration Version.
Delete query configuration
You can directly delete query configuration versions with an "unused" status on the Advanced Configuration > Query Configuration page.
In the query configuration list, a version with an "unused" status has a Delete button in the Actions column. Click Delete to remove the query configuration version.
You cannot delete a version that is in use; you can only view it. To delete it, you must first assign its clusters to a different version. Go to O&M Center > O&M Management > Configuration Update, select a different Query Configuration Version, and click OK. Once the original version's status changes to "unused", you can delete it.
Notes
-
You can only view versions that are currently in use; you cannot delete them.