- Elasticsearch 7.0 Cookbook(Fourth Edition)
- Alberto Paro
- 95字
- 2021-06-24 14:52:21
How to do it...
The HTTP method that's used for both operations is POST. The URL formats for refreshing an index are as follows:
http://<server>/<index_name(s)>/_refresh
The URL formats for refreshing all the indices in a cluster are as follows:
http://<server>/_refresh
To refresh an index, we will perform the following steps:
- If we consider the type order of the previous chapter, the call will be as follows:
POST /myindex/_refresh
- The result returned by Elasticsearch should be as follows:
{
"_shards" : {
"total" : 2,
"successful" : 1,
"failed" : 0
}
}