You can modify an Elasticsearch cluster's configuration file for purposes like accelerating queries, modifying cross-domain access configuration, adjusting the internal cache size, and managing the task queue size. The core configuration information of an Elasticsearch cluster is stored in a file named elasticsearch.yml. You can modify specific parameters in this file on the CSS management console.
Module Name | Parameter | Description |
|---|---|---|
Cross-domain Access | http.cors.allow-credentials | Whether to carry authentication information in cross-domain requests, that is, whether to contain the Access-Control-Allow-Credentials field in the response header. The value can be:
|
http.cors.allow-origin | Source IP addresses or domain names allowed for cross-domain access. When there are multiple values, separate them with commas (,). Example: 192.168.122.122:9200 or 192.168.1.1:9200, 192.168.1.2:9200 | |
http.cors.allow-headers | Request header fields for cross-domain access. When there are multiple values, separate them using a comma (,) and a space. Example: X-Requested-With, Content-Type, Content-Length The value can contain a maximum of 1024 characters. It can only contain letters, digits, hyphens (-), underscores (_), colons (:), and slashes (/). | |
http.cors.max-age | Maximum retention duration of pre-check responses in the browser cache. Unit: s Value range: 0 to 31,536,000 (0 to 1 year) Default value: 1,728,000 (20 days) | |
http.cors.enabled | Whether to enable cross-domain access. The value can be:
| |
http.cors.allow-methods | HTTP methods allowed for cross-domain access. When there are multiple values, separate them using a comma (,) and a space. Example: OPTIONS, GET, POST Value range: OPTIONS, HEAD, GET, POST, PUT, and DELETE | |
Reindexing | reindex.remote.whitelist | Which remote hosts are allowed for remote reindexing operations. Use commas (,) to separate multiple values. Example: 192.168.122.122:9200 or 192.168.1.1:9200, 192.168.1.2:9200 |
Custom Cache | indices.queries.cache.size | Maximum heap space allocated to the query cache. Unit: percentage (%) Value range: 1 to 100 Default value: 10% |
Queue Size in a Thread Pool | thread_pool.force_merge.size | Size of the thread pool used for force merge operations. Value range: a positive integer Default value: 1 |
Custom | Custom parameters | You can add any custom parameters supported by Elasticsearch. The parameter values must meet the following requirements:
WARNING: Set the values of any custom parameters to those supported by Elasticsearch. Otherwise, the cluster may fail to restart. Exercise caution when performing this operation. |
If the Status is Succeeded in the parameter modification list, the modification has been saved. Up to 20 modification records can be displayed.