Delete an item by ID
freakeinstein opened this issue · 5 comments
I supply the _id before adding it to the db
def convertDocuments(_id, vector):
{
"vector": {
"e": vector
},
"_id" : _id.encode('utf-8')
}
This way its easy to delete vectors using a deleteRequest without having to keep track over db keys
I noticed though that the vectors are only labeled as being deleted. They are not physically removed from disk
@marijnl You are right. To remove a document from the database, what you need to do is set _deleted
key to true, because AquilaDB follows Couch protocol and use PouchDB internally. But this doesn't remove that item from vector index. We need to do that as well. So, essentially, the implementation would be, we would delete the document the same way you have mentioned, which will trigger an internal change event which should call delete method on vector index. We appreciate your interest and are open to pull requests if you are able to pull this off..
@freakeinstein I think i dont have permissions to create a branch and PR. Can you grant me access? I didnt fix this specific issue but a typing issue of env variables.
Hi @marijnl, here are the steps to submit a pull request, which doesn't require write permissions.
- Fork (will take a photocopy) this project as your personal repository
- Clone that copy to your local system
- Make changes to the source code
- commit and push changes from your local system to your fork
- create a pull request to a-mma AquilaDB
that's it!
Code is rewritten. Bug is irrelevant and covered. closed.