Table of Contents

Method RetrieveFromMetadataAsync

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

RetrieveFromMetadataAsync(string, MetadataCollection, VectorRetrievalOptions, uint, CancellationToken)

Asynchronously retrieves vector entries from the specified collection that match the given metadata criteria.

public Task<List<PointEntry>> RetrieveFromMetadataAsync(string collectionIdentifier, MetadataCollection metadata, VectorRetrievalOptions options, uint maxResults, CancellationToken cancellationToken = default)

Parameters

collectionIdentifier string

The name of the collection to search within.

metadata MetadataCollection

A collection of metadata key-value pairs to filter the search results. Only entries that match these pairs are returned.

options VectorRetrievalOptions

A combination of VectorRetrievalOptions flags indicating which parts of each matching entry (vector data, metadata, or both) are included in the returned PointEntry.

maxResults uint

The maximum number of entries to return. Use this to limit memory usage and response time when querying large collections.

cancellationToken CancellationToken

An optional token that can be used to cancel the asynchronous retrieval operation.

Returns

Task<List<PointEntry>>

A task representing the asynchronous retrieval operation. The task result is a list of PointEntry items. Each PointEntry may include vector data and/or metadata based on the parameters specified.

Share