We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在
“我们也可以通过使用脚本给 tags 数组添加一个新的标签。在这个例子中,我们指定新的标签作为参数,而不是硬编码到脚本内部。 这使得 Elasticsearch 可以重用这个脚本,而不是每次我们想添加标签时都要对新脚本重新编译:”
这一段中的代码:
POST /website/blog/1/_update { "script" : "ctx._source.tags+=new_tag", "params" : { "new_tag" : "search" } }
在7.2无法执行,需要修改成以下代码才可以执行 POST /website/blog/1/_update { "script" : { "inline":"ctx._source.tags+=params.new_tag", "params" : { "new_tag" : "search" } } }
POST /website/blog/1/_update { "script" : { "inline":"ctx._source.tags+=params.new_tag", "params" : { "new_tag" : "search" } } }
The text was updated successfully, but these errors were encountered:
7.3.0,需要修改为: POST /website/blog/1/_update?pretty { "script" : { "inline":"ctx._source.tags.add(params.new_tag)", "params" : { "new_tag" : "search" } } }
Sorry, something went wrong.
No branches or pull requests
在
这一段中的代码:
POST /website/blog/1/_update { "script" : "ctx._source.tags+=new_tag", "params" : { "new_tag" : "search" } }
在7.2无法执行,需要修改成以下代码才可以执行
POST /website/blog/1/_update { "script" : { "inline":"ctx._source.tags+=params.new_tag", "params" : { "new_tag" : "search" } } }
The text was updated successfully, but these errors were encountered: