Delete Document(s) by Request Object
Delete document by document_id, by array of document_id (bulk), by query (SearchRequestObject) from index with index_id, or clear all documents from index. Immediately effective, independent of commit. Index space used by deleted documents is not reclaimed (until compaction is implemented), but result_count_total is updated. By manually deleting the delete.bin file the deleted documents can be recovered (until compaction). Deleted documents impact performance, especially but not limited to counting (Count, TopKCount). They also increase the size of the index (until compaction is implemented). For minimal query latency delete index and reindexing documents is preferred over deleting documents (until compaction is implemented). BM25 scores are not updated (until compaction is implemented), but the impact is minimal. Document ID can by obtained by search. When deleting by query (SearchRequestObject), it is advised to perform a dry run search first, to see which documents will be deleted.
Path parameters
index id
Headers
YOUR_SECRET_API_KEY
Request body
Example request
{
"length": 10,
"field_filter": [
"title"
],
"result_sort": [
{
"field": "date",
"order": "Ascending",
"base": "None"
}
]
}Response
Document deleted, returns indexed documents count