What @vsr1 is referring to is when you
upsert() a document through the SDK, there is an expiration field. It won’t help with documents that are already in there, but it will help in the future if you want documents to automatically be deleted 6 months later, to set the expiration when inserting/upserting.
If you don’t have a very large number of documents, what I might suggest for your current state is to put together a simple query that looks for the
meta.id() alone and then visits them to remove them. This would use a primary index, if you have one, so it’ll be efficient. You can do this with a single query in batches and then do the deletion from the SDK’s API on visitation. With virtual xattrs, there may even be a way to understand when the document was added.
This should be very efficient for the system as you wouldn’t be asking the query service to retrieve, unmarshal each doc.
What SDK are you using? I can’t guarantee it, but I might be able to point to some sample code.