This topic provides answers to some frequently asked questions about open source Elasticsearch.
- How do I configure the thread pool size for indexes?
- What do I do if OOM occurs?
- How do I manually manage a shard?
- What are the cache clearing policies for Elasticsearch?
- How do I reroute index shards?
- When I query an index, the statusCode: 500 error message is displayed. What do I do?
- How do I change the value of the auto_create_index parameter?
- How long is required to create a snapshot that will be stored in OSS?
- How do I specify the number of shards when I create an index?
- When I use the elasticsearch-repository-oss plug-in to migrate data from a self-managed Elasticsearch cluster, the following error message is displayed. What do I do?
- How do I adjust the Elasticsearch server time?
- What type of data can I perform Elasticsearch term queries on?
- What are the precautions for using aliases in Elasticsearch?
- How do I delete multiple indexes at a time?
How do I configure the thread pool size for indexes?

What do I do if OOM occurs?
curl -u elastic:<password> -XPOST "localhost:9200/<index_name>/_cache/clear?pretty"
Parameter | Description |
---|---|
<password> |
The password that is used to access your Alibaba Cloud Elasticsearch cluster. The password is specified when you create the cluster or initialize Kibana. |
<index_name> |
The name of the index. |
How do I manually manage a shard?
Use the reroute API or Cerebro. For more information, see Cluster reroute API and Cerebro.
What are the cache clearing policies for Elasticsearch?
- Clear the cache of all indexes
curl localhost:9200/_cache/clear?pretty
- Clear the cache of a specific index
curl localhost:9200/<index_name>/_cache/clear?pretty
- Clear the cache of multiple indexes
curl localhost:9200/<index_name1>,<index_name2>,<index_name3>/_cache/clear?pretty
How do I reroute index shards?
curl -XPOST 'localhost:9200/_cluster/reroute' -d '{
"commands" : [ {
"move" :
{
"index" : "test", "shard" : 0,
"from_node" : "node1", "to_node" : "node2"
}
},
{
"allocate" : {
"index" : "test", "shard" : 1, "node" : "node3"
}
}
]
}'
When I query an index, the statusCode: 500
error message is displayed. What do I do?
- If the query succeeds, the issue is caused by an invalid index name. In this case, change the index name. An index name can contain only letters, underscores (_), and digits.
- If the query fails, the issue is caused by an error in the index or your cluster. In this case, check whether your cluster stores the index and runs in a normal state.
How do I change the value of the auto_create_index
parameter?
PUT /_cluster/settings
{
"persistent" : {
"action": {
"auto_create_index": "false"
}
}
}
auto_create_index
parameter is false. This value indicates that the system does not automatically create
indexes. In most cases, we recommend that you do not change the value of this parameter.
Otherwise, excessive indexes are created, and the mappings or settings of the indexes
do not meet your expectations.
How long is required to create a snapshot that will be stored in OSS?
If the number of shards, memory usage, disk usage, and CPU utilization of your cluster are normal, about 30 minutes are required to create a snapshot for 80 GB of index data.
How do I specify the number of shards when I create an index?
You can divide the total data size by the data size of each shard to obtain the number of shards. We recommend that you limit the data size of each shard to 30 GB. If the data size of each shard exceeds 50 GB, query performance is severely affected.
- Shards are stored on different nodes. If the number of shards is set to a large value, more files need to be opened, and more interactions are required among the nodes. This decreases query performance.
- If the number of shards is set to a small value, each shard stores more data. This also decreases query performance.
When I use the elasticsearch-repository-oss plug-in to migrate data from a self-managed Elasticsearch cluster, the following error message is displayed. What do I do?
Error message: ERROR: This plugin was built with an older plugin structure. Contact the plugin author
to remove the intermediate "elasticsearch" directory within the plugin zip
Change the name of the ZIP plug-in package from elasticsearch to elasticsearch-repository-oss, and copy the package to the plugins directory.
How do I adjust the Elasticsearch server time?


What type of data can I perform Elasticsearch term queries on?
What are the precautions for using aliases in Elasticsearch?
The total number of shards for indexes that have the same alias must be less than 1,024.
How do I delete multiple indexes at a time?
PUT /_cluster/settings
{
"persistent": {
"action.destructive_requires_name": false
}
}