Update_by_query updating only one field

I have an index called "shipments" and it has a STA_CD. I would like to perform an update using CURL to update all documents with STA_CD = "OH" to STA_CD="FL". I'm having a lot of problems with the syntax.
Here's what I'm starting with but I'm not getting any matches:

curl -X POST "localhost:9200/shipments/_update_by_query" -H 'Content-Type: application/json' -d'
{
"query":{
"term":{
"STO_STA_CD":"OH"
}
},
"script":"ctx._source.STO_STA_CD = 'AK'"
}
'

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.