I am new to Couchbase database.
I have populated a bucket with 10,000 documents and I want to remove these documents using document Id pattern by using N1Ql delete query. For example the keys are like :ao.sl3:eid:89049032000001000000000016677381. So I want to use a pattern , something like ':ao.sl3:eid%' to delete all the documents.
On Couchbase Web UI, my document looks like below image -
I want to use CouchBase web UI query editor to delete the documents.
Thanks
You will need a primary index to do this, but you can simply use the LIKE
operator:
DELETE
FROM mybucketname
WHERE META().id LIKE ':ao.sl3:eid%'
Some things to keep in mind:
DELETE
has run.