Elasticsearch Rest 客户端更新操作
Elasticsearch Rest Client Update Operation
我正在开发一个使用 Elasticsearch 5.4 作为数据存储的项目。我需要更新索引中所有文档中的一个字段。我们正在使用 Java RestClient 在 Java 和 Elasticsearch 之间建立连接,我无法在 RestClient 5.4.3 中找到更新 API 的任何文档或资源。
谁能指导我如何从这里开始!
注意:我无法使用传输客户端。
谢谢
您是否尝试在 _update_by_query
端点上执行 POST 请求?
The simplest usage of _update_by_query
just performs an update on every document in the index without changing the source.
和
So far we’ve only been updating documents without changing their source. That is genuinely useful for things like picking up new properties but it’s only half the fun. _update_by_query
supports a script object to update the document.
我正在开发一个使用 Elasticsearch 5.4 作为数据存储的项目。我需要更新索引中所有文档中的一个字段。我们正在使用 Java RestClient 在 Java 和 Elasticsearch 之间建立连接,我无法在 RestClient 5.4.3 中找到更新 API 的任何文档或资源。
谁能指导我如何从这里开始!
注意:我无法使用传输客户端。
谢谢
您是否尝试在 _update_by_query
端点上执行 POST 请求?
The simplest usage of
_update_by_query
just performs an update on every document in the index without changing the source.
和
So far we’ve only been updating documents without changing their source. That is genuinely useful for things like picking up new properties but it’s only half the fun.
_update_by_query
supports a script object to update the document.