我在ElasticSearch 7.9.2中使用以下技術將一個欄位復制到另一個欄位中
localhost:9200/your_index/_update_by_query
{
"query" : {
"match" : {
"product_name": "iphone 9"
}
},
"腳本" : "ctx._source.company = ctx._source.make;"
}
發生以下錯誤
"型別": "決議例外"
"原因": "[腳本]中的Start_Object的未知鍵"
uj5u.com熱心網友回復:
下面的代碼執行成功。
localhost:9200/your_index/_update_by_query
{
"腳本" : {
"lang": "painless",
"來源": "ctx._source.company = ctx._source.make;"
},
"查詢" : {
"匹配" : {
"product_name": "iphone 9"
}
}
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/329574.html
標籤:
