Using update query for document as follows:
/<indexname>/_update/<id>
{
doc: {
/// the doc here
}
}
Is there a way, I can put condition like created_at field in the existing doc is less than created_at we are passing?
You are probably looking for update by query api.
eg
POST <index>/_update_by_query
{
"query": {
"range": {
"created_at": {
"lte": "2019-01-10"
}
}
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.