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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qdrant: fix skipping upserts #1208

Merged
merged 1 commit into from May 30, 2023
Merged

Conversation

shawncal
Copy link
Member

Description

In the Qdrant connector, during Upsert(), it checks whether the vector already exists in the db; if so, it calls continue and skips upserting. The expected behavior of Upsert() is Insert+Update, but currently only the insert is working updates are explicitly skipped.

Resolves #1035

Also includes some minor cleanup on the internal request builder classes:

  • DeleteRange
  • UpsertRange
    ...allow you to create the Builder, add all operations, and Build() in a single statement, so you never have to hold an instance of the Builder as a var just to operate a loop.

Contribution Checklist

@shawncal
Copy link
Member Author

@tawalke This code is UNTESTED (hence the "Draft" status). Can you please take over this PR, test with a qdrant instance?

@github-actions github-actions bot added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel labels May 25, 2023
@shawncal shawncal marked this pull request as ready for review May 30, 2023 18:51
@microsoft microsoft deleted a comment from tawalke May 30, 2023
@shawncal shawncal merged commit 40de0e5 into microsoft:main May 30, 2023
15 checks passed
shawncal added a commit to shawncal/semantic-kernel that referenced this pull request Jul 6, 2023
### Description
In the Qdrant connector, during Upsert(), it checks whether the vector already exists in the db; if so, it calls `continue` and skips upserting. The expected behavior of Upsert() is Insert+Update, but currently only the insert is working updates are explicitly skipped.

Resolves microsoft#1035

Also includes some minor cleanup on the internal request builder classes:
- DeleteRange
- UpsertRange
...allow you to create the Builder, add all operations, and Build() in a single statement, so you never have to hold an instance of the Builder as a var just to operate a loop.
@shawncal shawncal deleted the qdrant-upsert-fix branch July 18, 2023 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UpsertVectorsAsync in the QdrantVectorDbClient class
3 participants