Table of Contents

Method UpdateMetadataAsync

Namespace
LMKit.Data.Storage.PgVector
Assembly
LM-Kit.NET.Data.Connectors.PgVector.dll

UpdateMetadataAsync(string, string, MetadataCollection, MetadataUpdateMode, CancellationToken)

Asynchronously updates the metadata associated with an existing vector entry in the specified collection.

public Task UpdateMetadataAsync(string collectionIdentifier, string id, MetadataCollection metadata, MetadataUpdateMode mode, CancellationToken cancellationToken = default)

Parameters

collectionIdentifier string

The name of the collection containing the vector whose metadata is to be updated.

id string

The unique identifier of the vector entry for which the metadata is being updated.

metadata MetadataCollection

A collection of key-value pairs representing the metadata to update. The keys correspond to metadata names, and the values are the new values to be set.

mode MetadataUpdateMode

Controls how the supplied metadata is applied. Merge merges the new entries into the existing metadata (overwriting matching keys); Replace discards all existing metadata before applying the new entries.

cancellationToken CancellationToken

An optional token to cancel the asynchronous metadata update operation.

Returns

Task

A task representing the asynchronous update operation.

Share