Cluster health API has parameter wait_for_status
that (according to documentation) waits for specified cluster status. However, I would like to wait for specific index to reach some status.
If I use cluster health request with level=indices
and index=myindex
will the wait still operate on cluster level? I guess polling the status and continuing after status is reached would have the same effect but is there better way to do this?
By default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds. You can change this default interval using the index. refresh_interval setting.
Verify elasticsearch is running by typing $ smarts/bin/sm_service show. 2. Verify elasticsearch is serving requests from a browser on the same machine in Windows or using a tool like curl on Linux. A page specific to the browser will appear.
Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index.
It is possible to use the health
api for specific indices, as well:
GET /_cluster/health/index_name?wait_for_status=green&timeout=10s
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With