Udostępnij za pośrednictwem


RedisJsonVectorStoreRecordCollection<TRecord> Class

Definition

Service for storing and retrieving vector records, that uses Redis JSON as the underlying storage.

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

Type Parameters

TRecord

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

Inheritance
RedisJsonVectorStoreRecordCollection<TRecord>
Implements

Constructors

RedisJsonVectorStoreRecordCollection<TRecord>(IDatabase, String, RedisJsonVectorStoreRecordCollectionOptions<TRecord>)

Initializes a new instance of the RedisJsonVectorStoreRecordCollection<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.

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.

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

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

Applies to