Поделиться через


AzureAISearchVectorStoreRecordCollection<TRecord> Class

Definition

Service for storing and retrieving vector records, that uses Azure AI Search as the underlying storage.

public class AzureAISearchVectorStoreRecordCollection<TRecord> : Microsoft.Extensions.VectorData.IKeywordHybridSearch<TRecord>, Microsoft.Extensions.VectorData.IVectorizableTextSearch<TRecord>, Microsoft.Extensions.VectorData.IVectorizedSearch<TRecord>, Microsoft.Extensions.VectorData.IVectorStoreRecordCollection<string,TRecord>
type AzureAISearchVectorStoreRecordCollection<'Record> = class
    interface IVectorStoreRecordCollection<string, 'Record>
    interface IVectorizedSearch<'Record>
    interface IVectorizableTextSearch<'Record>
    interface IKeywordHybridSearch<'Record>
Public Class AzureAISearchVectorStoreRecordCollection(Of TRecord)
Implements IKeywordHybridSearch(Of TRecord), IVectorizableTextSearch(Of TRecord), IVectorizedSearch(Of TRecord), IVectorStoreRecordCollection(Of String, TRecord)

Type Parameters

TRecord

The data model to use for adding, updating and retrieving data from storage.

Inheritance
AzureAISearchVectorStoreRecordCollection<TRecord>
Implements

Constructors

AzureAISearchVectorStoreRecordCollection<TRecord>(SearchIndexClient, String, AzureAISearchVectorStoreRecordCollectionOptions<TRecord>)

Initializes a new instance of the AzureAISearchVectorStoreRecordCollection<TRecord> class.

Properties

CollectionName

Gets the name of the collection.

Methods

CollectionExistsAsync(CancellationToken)

Checks if the collection exists in the vector store.

CreateCollectionAsync(CancellationToken)

Creates this collection in the vector store.

CreateCollectionIfNotExistsAsync(CancellationToken)

Creates this collection in the vector store if it doesn't already exist.

DeleteAsync(String, CancellationToken)

Deletes a record from the vector store. Does not guarantee that the collection exists.

DeleteBatchAsync(IEnumerable<String>, CancellationToken)

Deletes a batch of records from the vector store. Does not guarantee that the collection exists.

DeleteCollectionAsync(CancellationToken)

Deletes the collection from the vector store.

GetAsync(String, GetRecordOptions, CancellationToken)

Gets a record from the vector store. Does not guarantee that the collection exists. Returns null if the record is not found.

GetBatchAsync(IEnumerable<String>, GetRecordOptions, CancellationToken)

Gets a batch of records from the vector store. Does not guarantee that the collection exists.

HybridSearchAsync<TVector>(TVector, ICollection<String>, HybridSearchOptions<TRecord>, CancellationToken)

Performs a hybrid search for records that match the given embedding and keywords, after applying the provided filters.

UpsertAsync(TRecord, CancellationToken)

Upserts a record into the vector store. Does not guarantee that the collection exists. If the record already exists, it is updated. If the record does not exist, it is created.

UpsertBatchAsync(IEnumerable<TRecord>, CancellationToken)

Upserts a group of records into the vector store. Does not guarantee that the collection exists. If the record already exists, it is updated. If the record does not exist, it is created.

VectorizableTextSearchAsync(String, VectorSearchOptions<TRecord>, CancellationToken)

Searches the vector store for records that match the given text and filter. The text string will be vectorized downstream and used for the vector search.

VectorizedSearchAsync<TVector>(TVector, VectorSearchOptions<TRecord>, CancellationToken)

Searches the vector store for records that match the given embedding and filter.

Applies to