VolatileVectorStoreRecordCollection<Record> Class

  • java.lang.Object
    • com.microsoft.semantickernel.data.VolatileVectorStoreRecordCollection<Record>

Type Parameters

Record

The type of record in the collection.

Implements

VectorStoreRecordCollection<java.lang.String,Record>

public class VolatileVectorStoreRecordCollection<Record>
implements VectorStoreRecordCollection<java.lang.String,Record>

Represents a volatile vector store record collection.

Constructor Summary

Constructor Description
VolatileVectorStoreRecordCollection(String collectionName, VolatileVectorStoreRecordCollectionOptions<Record> options)

Creates a new instance of the volatile vector store record collection.

Method Summary

Modifier and Type Method and Description
reactor.core.publisher.Mono<java.lang.Boolean> collectionExistsAsync()

Checks if the collection exists in the store.

reactor.core.publisher.Mono<VectorStoreRecordCollection<java.lang.String,Record>> createCollectionAsync()

Creates the collection in the store.

reactor.core.publisher.Mono<VectorStoreRecordCollection<java.lang.String,Record>> createCollectionIfNotExistsAsync()

Creates the collection in the store if it does not exist.

reactor.core.publisher.Mono<java.lang.Void> deleteAsync(String key, DeleteRecordOptions options)

Deletes a record from the store.

reactor.core.publisher.Mono<java.lang.Void> deleteBatchAsync(List<String> strings, DeleteRecordOptions options)

Deletes a batch of records from the store.

reactor.core.publisher.Mono<java.lang.Void> deleteCollectionAsync()

Deletes the collection from the store.

reactor.core.publisher.Mono<Record> getAsync(String key, GetRecordOptions options)

Gets a record from the store.

reactor.core.publisher.Mono<java.util.List<Record>> getBatchAsync(List<String> keys, GetRecordOptions options)

Gets a batch of records from the store.

java.lang.String getCollectionName()

Gets the name of the collection.

reactor.core.publisher.Mono<VectorSearchResults<Record>> searchAsync(List<Float> vector, VectorSearchOptions options)

Vectorized search.

reactor.core.publisher.Mono<java.lang.String> upsertAsync(Record data, UpsertRecordOptions options)

Inserts or updates a record in the store.

reactor.core.publisher.Mono<java.util.List<java.lang.String>> upsertBatchAsync(List<Record> data, UpsertRecordOptions options)

Inserts or updates a batch of records in the store.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

VolatileVectorStoreRecordCollection

public VolatileVectorStoreRecordCollection(String collectionName, VolatileVectorStoreRecordCollectionOptions options)

Creates a new instance of the volatile vector store record collection.

Parameters:

collectionName - The name of the collection.
options - The options for the collection.

Method Details

collectionExistsAsync

public Mono collectionExistsAsync()

Checks if the collection exists in the store.

Returns:

A Mono emitting a boolean indicating if the collection exists.

createCollectionAsync

public Mono> createCollectionAsync()

Creates the collection in the store.

Returns:

A Mono representing the completion of the creation operation.

createCollectionIfNotExistsAsync

public Mono> createCollectionIfNotExistsAsync()

Creates the collection in the store if it does not exist.

Returns:

A Mono representing the completion of the creation operation.

deleteAsync

public Mono deleteAsync(String key, DeleteRecordOptions options)

Deletes a record from the store.

Parameters:

key - The key of the record to delete.
options - The options for deleting the record.

Returns:

A Mono representing the completion of the deletion operation.

deleteBatchAsync

public Mono deleteBatchAsync(List strings, DeleteRecordOptions options)

Deletes a batch of records from the store.

Parameters:

strings - The keys of the records to delete.
options - The options for deleting the records.

Returns:

A Mono representing the completion of the deletion operation.

deleteCollectionAsync

public Mono deleteCollectionAsync()

Deletes the collection from the store.

Returns:

A Mono representing the completion of the deletion operation.

getAsync

public Mono getAsync(String key, GetRecordOptions options)

Gets a record from the store.

Parameters:

key - The key of the record to get.
options - The options for getting the record.

Returns:

A Mono emitting the record.

getBatchAsync

public Mono> getBatchAsync(List keys, GetRecordOptions options)

Gets a batch of records from the store.

Parameters:

keys - The keys of the records to get.
options - The options for getting the records.

Returns:

A Mono emitting a list of records.

getCollectionName

public String getCollectionName()

Gets the name of the collection.

Returns:

The name of the collection.

searchAsync

public Mono> searchAsync(List vector, VectorSearchOptions options)

Vectorized search. This method searches for records that are similar to the given vector.

Parameters:

vector - The vector to search with.
options - The options to use for the search.

Returns:

A list of search results.

upsertAsync

public Mono upsertAsync(Record data, UpsertRecordOptions options)

Inserts or updates a record in the store.

Parameters:

data - The record to upsert.
options - The options for upserting the record.

Returns:

A Mono emitting the key of the upserted record.

upsertBatchAsync

public Mono> upsertBatchAsync(List data, UpsertRecordOptions options)

Inserts or updates a batch of records in the store.

Parameters:

data - The records to upsert.
options - The options for upserting the records.

Returns:

A Mono emitting a list of keys of the upserted records.

Applies to