Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete an item by ID #25

Closed
freakeinstein opened this issue Aug 5, 2019 · 5 comments
Closed

Delete an item by ID #25

freakeinstein opened this issue Aug 5, 2019 · 5 comments
Assignees
Labels
enhancement New feature or request high priority
Milestone

Comments

@freakeinstein
Copy link
Member

No description provided.

@freakeinstein freakeinstein added enhancement New feature or request high priority labels Aug 5, 2019
@freakeinstein freakeinstein added this to the v0.3 milestone Aug 5, 2019
@freakeinstein freakeinstein self-assigned this Aug 5, 2019
@marijnl
Copy link

marijnl commented Dec 24, 2019

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

@freakeinstein
Copy link
Member Author

@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..

@marijnl
Copy link

marijnl commented Jan 6, 2020

@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.

@freakeinstein
Copy link
Member Author

freakeinstein commented Jan 6, 2020

Hi @marijnl, here are the steps to submit a pull request, which doesn't require write permissions.

  1. Fork (will take a photocopy) this project as your personal repository
  2. Clone that copy to your local system
  3. Make changes to the source code
  4. commit and push changes from your local system to your fork
  5. create a pull request to a-mma AquilaDB
    that's it!

@freakeinstein
Copy link
Member Author

Code is rewritten. Bug is irrelevant and covered. closed.

freakeinstein pushed a commit that referenced this issue Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority
Projects
None yet
Development

No branches or pull requests

2 participants