pub async fn delete(
configuration: &Configuration,
delete_document_request: DeleteDocumentRequest,
) -> Result<DeleteResponse, Error<DeleteError>>
Expand description
Delete one or several documents. The method has 2 ways of deleting: either by id, in case only one document is deleted or by using a match query, in which case multiple documents can be delete . Example of input to delete by id: {'index':'movies','id':100}
Example of input to delete using a query: { 'index':'movies', 'query': { 'bool': { 'must': [ {'query_string':'new movie'} ] } } }
The match query has same syntax as in for searching. Responds with an object telling how many documents got deleted: {'_index':'products','updated':1}