Changing Index Refresh Time and Number of Copies
The index.refresh_interval parameter controls how frequent segment files are created. The default value is 1s, meaning that a new segment file is forcibly generated every second. A longer index update means a larger segment file, effectively reducing the I/O and segments merge pressure. You can set this configuration item during index creation (or in a template).
If you only import data and do not need real-time queries, you can set index.refresh_interval to -1 and index.number_of_replicas to 0. However, this setting may cause data loss. You can set the parameters to proper values after you finish importing the data.
The following command can be used for changing the two parameters for one specific index, multiple indexes (separated by commas), and all indexes (using wildcard *).
curl -XPUT --tlsv1.2 --negotiate -k -u : "https://ip:httpport/myindex/_settings" -H 'Content-Type: application/json' -d' { "number_of_replicas": 0, "refresh_interval": "180s" }'
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot