Delete Document(s) by Request Object
Changed onDelete 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.
Request
- Base URLhttp://127.0.0.1
- Authnone declared. Required headers: apikey
- TypeScriptA function with typed inputs. Its response is checked against the schema.
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
Changes
- breaking
removed
subschema #2subschema #3subschema #4from therequest propertyoneOflist - warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
the request property
//became optional - info
the
request property default valuewas added - info
the
request property default valuewas added - info
the
request property default valuewas added - info
the
request property default valueSearchOnlywas added - info
the
request property default valueUnionwas added - info
the
request property default valuewas added - info
the
request property default valueTopkCountwas added - info
the
request property default valueLexicalwas added - info
added
subschema #2to therequest propertyoneOflist - info
added
subschema #2subschema #3subschema #4to therequest propertyoneOflist
- breaking
- info
api operation id
delete_document_by_object_apiremoved and replaced withdelete_document_by_request_object
- info