Index
Update a document in a table
Update one or several documents. The update can be made by passing the id or by using a match query in case multiple documents can be updated. For example update a document using document id:
{'table':'movies','doc':{'rating':9.49},'id':100}
And update by using a match query:
{
'table':'movies',
'doc':{'rating':9.49},
'query':
{
'bool':
{
'must':
[
{'query_string':'new movie'}
]
}
}
}
The match query has same syntax as for searching. Responds with an object that tells how many documents where updated in format:
{'table':'products','updated':1}
post/update
Request body
Response
item updated
Example response
{
"table": "test",
"updated": 29
}