Skip to content

Implement aget_nodes and adelete in PGVectorStore #18515

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

Merged
merged 1 commit into from
Apr 26, 2025

Conversation

GinkREAL
Copy link
Contributor

@GinkREAL GinkREAL commented Apr 24, 2025

Implements aget_nodes in PGVectorStore, previously this redirected to get_nodes causing a hidden sync operation in async paths.

Also implements adelete(), along with an index for ref_doc_id

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 24, 2025
@GinkREAL GinkREAL force-pushed the pgvector_aget_nodes branch 2 times, most recently from d1bd0cd to 42bb8d1 Compare April 24, 2025 05:31
@GinkREAL GinkREAL changed the title Implement aget_nodes in PGVectorStore Implement aget_nodes and adelete in PGVectorStore Apr 24, 2025
@GinkREAL
Copy link
Contributor Author

Hold on. let me add an index on delete() first
image

@GinkREAL GinkREAL force-pushed the pgvector_aget_nodes branch from 42bb8d1 to 6353049 Compare April 24, 2025 07:13
@GinkREAL
Copy link
Contributor Author

BEFORE:
image

AFTER:
image

@GinkREAL
Copy link
Contributor Author

coverage is probably not working since most tests are skipped due to no postgres

image

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 26, 2025
@logan-markewich logan-markewich merged commit 8ac4cd3 into run-llama:main Apr 26, 2025
10 of 11 checks passed
@GinkREAL
Copy link
Contributor Author

GinkREAL commented May 6, 2025

@logan-markewich I've realized a issue with the index. The delete operation is on doc_id and not ref_doc_id, however checking the code they seem mostly the same?

Which one is the supposed one to be used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants