I need to update a 'Decision" filed in tdcorescalio index . But i geeting belwo error.
Mapping:
{"tdcorescaleio":{"mappings":{"scaleio":{"properties":{"Decision":{"type":"keyword"}}},"tdcorescaleio":{"properties":{"Decision":{"type":"keyword"},"date":{"type":"date"},"doc":{"properties":{"Decision":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"query":{"properties":{"match_all":{"type":"object"}}},"size":{"type":"long"},"sort":{"properties":{"date":{"properties":{"order":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}}}}}}}}}
Error:
curl -X POST "localhost:9200/tdcorescaleio/tdcorescaleio/_update_by_query?pretty" -H 'Content-Type: application/json' -d'
{
"query": { "match_all": {} },
"doc": { "Decision": "NA" }
}'
{
"error" : {
"root_cause" : [
{
"type" : "parsing_exception",
"reason" : "Unknown key for a START_OBJECT in [doc].",
"line" : 4,
"col" : 12
}
],
"type" : "parsing_exception",
"reason" : "Unknown key for a START_OBJECT in [doc].",
"line" : 4,
"col" : 12
},
"status" : 400
}
Let me know the exact query to update a particular field in all docs