I have been trying to use the update by query API to find document subject terms and update them:
"subject": [{
"@value": "Football"
}, {
"@value": "Columbus"
}]
I would like to run a query across the entire index to find the term "Football" and replace, across all documents, with "Football (Ohio State)". I was not able to get any of the update by query to work. I tried this query:
{
"script": {
"inline": "ctx._source.subject.@value = "football (Ohio State)""
},
"query": {
"term": {
"subject.@value": "football"
}
}
}
Also, the reason for having the nested "@values" is because those nested objects can also have "@id" values for URIs. It serves as a bridge way for indexing RDF data.