Documentation Index
Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Delete Command for Python SDK
The delete method allows you to delete documents from your index using various criteria.
Arguments
ids
string[] | number[] | string | number
One or more document IDs to delete.
A string prefix to match document IDs for deletion. All documents with IDs starting with this prefix will be deleted.
A filter to delete documents based on content fields.Deleting document with filter is a O(N) operation that performs a full
scan. Therefore, it might be slow for large indexes.
Response
The number of documents that were successfully deleted.
index.delete(ids=["star-wars", "inception"]);