Skip to content

implement update by query for extras

When extras already exists but need to be updated we have to use the _update_by_query syntax. cern-search-rest-api provides an endpoint ubq but needs to be tested.

Example body of the request:

body = [{
     "op": "replace",
     "path": "/extras/".format(extra=url),
     "value": content
}]
return self.patch_doc(search_instance, doc['control_number'], body, headers)