KZiovas
KZiovas

Reputation: 4799

How to write a delete query in Vespa DB

I see the query documentation page of the Vespa vector database but there is no example anywhere of how to do a delete query based on a criteria.

For example how do we do the SQL equivalent of in Vespa?

DELETE FROM * WHERE myfield="test"

Upvotes: 1

Views: 78

Answers (1)

Jon
Jon

Reputation: 2339

There are no write operations in YQL, but you can do this with the document API: https://docs.vespa.ai/en/reference/document-v1-api-reference.html#delete

curl -X DELETE \
  --cert data-plane-public-cert.pem --key data-plane-private-key.pem \
  "http://localhost:8080/document/v1/mynamespace/music/docid?selection=true&cluster=my_cluster"

Upvotes: 2

Related Questions