Find documents using a query, delete, repeat. Pseudocode:
while True; do
query and read document ids, if empty exit
delete document ids using /document/v1
wait a sec # optional, add wait to reduce load while deleting
Like 1, but use the Vespa feed client.
Instead of deleting one-by-one, stream remove operations to the API (write a Java program for this),
or append to a file and use the binary:
Use a document selection to expire documents.
This deletes all documents not matching the expression.
It is possible to use parent documents and imported fields for expiry of a document set.
The content node will iterate over the corpus and delete documents (that are later compacted out):