弹性搜索[1.5.2] update_by_query无法正常工作 [英] Elasticsearch [1.5.2] update_by_query doesn't work as expected
问题描述
POST test_index / _update_by_query
{
查询:{
match {
label:{
query:checked,
type:短语
}
}
},
script:ctx._source.status ='ok'
}
看起来它正在找到文档,只是不更新它们。这是奇迹的输出
{
ok:true,
taken:7531 ,
total:230954,
updated:0,
indices:[
{
test_index:{}
}
]
}
我已经在 https://github.com/yakaz/elasticsearch-action-updatebyquery 。任何帮助将不胜感激。感谢提前 -
最后弄清楚发生了什么。要添加另一行到.yml来使这项工作。以下是我添加到配置文件的更改:
script.inline:true
script.indexed:true
script.disable_dynamic:false
添加第三行有差异。感谢您的帮助意见。
I'm fairly new to Elasticsearch so apologies if I am missing something elementary. I am trying to update a field within documents in my index.
POST test_index/_update_by_query
{
"query": {
"match": {
"label": {
"query": " checked",
"type": "phrase"
}
}
},
"script": "ctx._source.status = 'ok'"
}
Looks like it's finding the documents, just doesn't update them. Here is the output in marvel
{
"ok": true,
"took": 7531,
"total": 230954,
"updated": 0,
"indices": [
{
"test_index": {}
}
]
}
I've installed the plugin at https://github.com/yakaz/elasticsearch-action-updatebyquery as recommended. Any help would be most appreciated. Thanks in advance -
Finally figured out what was going on. Had to add another line to the .yml to make this work. Here are the changes I added to the configuration file:
script.inline: true
script.indexed: true
script.disable_dynamic: false
adding the 3rd line makes the difference. thanks for the helpful comments.
这篇关于弹性搜索[1.5.2] update_by_query无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!