Skip to content

UpsertVectorsAsync in the QdrantVectorDbClient class #1035

Closed

Description

@kenkenken123

UpsertVectorsAsync in the QdrantVectorDbClient class will not upsert. Because the code encounters some data in the database, it will jump out of the loop, so it is not added to the UpsertVector.

Below is the code:
Microsoft.SemanticKernel.Connectors.Memory.Qdrant.QdrantVectorDbClient.UpsertVectorsAsync

foreach (var record in vectorData)
{
QdrantVectorRecord? existingRecord = await this.GetVectorsByIdAsync(collectionName, new[] { record.PointId }, false, cancellationToken).FirstOrDefaultAsync(cancellationToken).ConfigureAwait(false);

        if (existingRecord != null)
        {
            continue;
        }

        requestBuilder.UpsertVector(record);
    }

Activity

  1. evchaki commented on May 18, 2023

    @evchaki
    Contributor

    Abby Harrison (@awharrison-28) can you take a look?

  2. amsingha commented on May 24, 2023

    @amsingha

    it also seems strange that update is skipped if its an existinf record, even though method is called "upsert" - we have scenarios where we are updating the embeddings for an existing record. Can this limitation also be removed as part of the fix, so it always updates existing records?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions