Interface VectorStoreRecordCollection<Key,​Record>

  • Type Parameters:
    Key - The type of the key of the records in the collection.
    Record - The type of the records in the collection.
    All Superinterfaces:
    VectorizedSearch<Record>
    All Known Implementing Classes:
    VolatileVectorStoreRecordCollection

    public interface VectorStoreRecordCollection<Key,​Record>
    extends VectorizedSearch<Record>
    Represents a collection of records in a vector store.
    • Method Detail

      • getCollectionName

        String getCollectionName()
        Gets the name of the collection.
        Returns:
        The name of the collection.
      • collectionExistsAsync

        reactor.core.publisher.Mono<Boolean> collectionExistsAsync()
        Checks if the collection exists in the store.
        Returns:
        A Mono emitting a boolean indicating if the collection exists.
      • createCollectionAsync

        reactor.core.publisher.Mono<VectorStoreRecordCollection<Key,​Record>> createCollectionAsync()
        Creates the collection in the store.
        Returns:
        A Mono representing the completion of the creation operation.
      • createCollectionIfNotExistsAsync

        reactor.core.publisher.Mono<VectorStoreRecordCollection<Key,​Record>> createCollectionIfNotExistsAsync()
        Creates the collection in the store if it does not exist.
        Returns:
        A Mono representing the completion of the creation operation.
      • deleteCollectionAsync

        reactor.core.publisher.Mono<Void> deleteCollectionAsync()
        Deletes the collection from the store.
        Returns:
        A Mono representing the completion of the deletion operation.
      • getAsync

        reactor.core.publisher.Mono<Record> getAsync​(Key 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

        reactor.core.publisher.Mono<List<Record>> getBatchAsync​(List<Key> 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.
      • upsertAsync

        reactor.core.publisher.Mono<Key> 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

        reactor.core.publisher.Mono<List<Key>> upsertBatchAsync​(List<Record> 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.
      • deleteAsync

        reactor.core.publisher.Mono<Void> deleteAsync​(Key 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

        reactor.core.publisher.Mono<Void> deleteBatchAsync​(List<Key> keys,
                                                           DeleteRecordOptions options)
        Deletes a batch of records from the store.
        Parameters:
        keys - The keys of the records to delete.
        options - The options for deleting the records.
        Returns:
        A Mono representing the completion of the deletion operation.