Deleting a document
Use the DELETE
method on the base URL of the Ingestion API to delete an index document. Use this method when you need to delete content quickly.
When an administrator recrawls a pull source, either manually or through scheduled crawls, Search updates all index documents with the latest data from your original content. This action overwrites any updates you made through Ingestion API if they aren't also applied to the original content. To prevent this, we recommend that you always update the original content with changes made through the Ingestion API. This synchronization ensures that your modifications are maintained in future crawls.
To use the Ingestion API to delete a document, make a DELETE
call to the Delete Document endpoint.
For the data model of this method and a description of objects and keys, see the Ingestion API reference. You can view your base URL in the Developer Resources section of Search.
For example, you want to delete an index document for all locales.
Here is a sample DELETE
cURL call:
curl -X DELETE --location 'https://<base-url/domains/<domainID>/sources/<sourceID>/entities/<entity>/documents/<documentID>?locale=all' \
--header 'Content-Type: application/json' \
--header 'Authorization: <api-key>' \