Partager via


MilvusMemoryStore Class

Definition

An implementation of IMemoryStore for the Milvus vector database.

public class MilvusMemoryStore : IDisposable, Microsoft.SemanticKernel.Memory.IMemoryStore
type MilvusMemoryStore = class
    interface IMemoryStore
    interface IDisposable
Public Class MilvusMemoryStore
Implements IDisposable, IMemoryStore
Inheritance
MilvusMemoryStore
Implements

Constructors

MilvusMemoryStore(MilvusClient, String, Int32, SimilarityMetricType, ConsistencyLevel)

Initializes a new instance of MilvusMemoryStore over the given Milvus.Client.MilvusClient.

MilvusMemoryStore(String, Int32, Boolean, String, String, Int32, SimilarityMetricType, ConsistencyLevel, ILoggerFactory)

Creates a new MilvusMemoryStore, connecting to the given hostname on the default Milvus port of 19530. For more advanced configuration opens, construct a Milvus.Client.MilvusClient instance and pass it to MilvusMemoryStore(MilvusClient, String, Int32, SimilarityMetricType, ConsistencyLevel).

MilvusMemoryStore(String, String, Int32, Boolean, String, String, Int32, SimilarityMetricType, ConsistencyLevel, ILoggerFactory)

Creates a new MilvusMemoryStore, connecting to the given hostname on the default Milvus port of 19530. For more advanced configuration opens, construct a Milvus.Client.MilvusClient instance and pass it to MilvusMemoryStore(MilvusClient, String, Int32, SimilarityMetricType, ConsistencyLevel).

MilvusMemoryStore(String, String, String, Int32, Boolean, String, String, Int32, SimilarityMetricType, ConsistencyLevel, ILoggerFactory)

Creates a new MilvusMemoryStore, connecting to the given hostname on the default Milvus port of 19530. For more advanced configuration opens, construct a Milvus.Client.MilvusClient instance and pass it to MilvusMemoryStore(MilvusClient, String, Int32, SimilarityMetricType, ConsistencyLevel).

Properties

Client

Exposes the underlying Client used to communicate with Milvus. Can be used to execute operations not supported by the IMemoryStore abstraction.

Methods

CreateCollectionAsync(String, CancellationToken)

Creates a new collection in the data store.

DeleteCollectionAsync(String, CancellationToken)

Deletes a collection from the data store.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Dispose(Boolean)

Implements the dispose pattern.

DoesCollectionExistAsync(String, CancellationToken)

Determines if a collection exists in the data store.

GetAsync(String, String, Boolean, CancellationToken)

Gets a memory record from the data store. Does not guarantee that the collection exists.

GetBatchAsync(String, IEnumerable<String>, Boolean, CancellationToken)

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

GetCollectionsAsync(CancellationToken)

Gets all collection names in the data store.

GetNearestMatchAsync(String, ReadOnlyMemory<Single>, Double, Boolean, CancellationToken)

Gets the nearest match to an embedding of type Single. Does not guarantee that the collection exists.

GetNearestMatchesAsync(String, ReadOnlyMemory<Single>, Int32, Double, Boolean, CancellationToken)

Gets the nearest matches to an embedding of type Single. Does not guarantee that the collection exists.

RemoveAsync(String, String, CancellationToken)

Removes a memory record from the data store. Does not guarantee that the collection exists.

RemoveBatchAsync(String, IEnumerable<String>, CancellationToken)

Removes a batch of memory records from the data store. Does not guarantee that the collection exists.

UpsertAsync(String, MemoryRecord, CancellationToken)

Upserts a memory record into the data store. Does not guarantee that the collection exists. If the record already exists, it will be updated. If the record does not exist, it will be created.

UpsertBatchAsync(String, IEnumerable<MemoryRecord>, CancellationToken)

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

Applies to