Interface RVectorSetAsync

All Superinterfaces:
RExpirableAsync, RObjectAsync
All Known Subinterfaces:
RVectorSet
All Known Implementing Classes:
RedissonVectorSet

public interface RVectorSetAsync extends RExpirableAsync
Async interface for Vector Set
Author:
Nikita Koksharov
  • Method Details

    • addAsync

      RFuture<Boolean> addAsync(VectorAddArgs args)
      Adds an element
      Parameters:
      args - add arguments
      Returns:
      true if element was added and false if updated
    • sizeAsync

      RFuture<Integer> sizeAsync()
      Returns the number of elements
      Returns:
      number of elements
    • dimensionsAsync

      RFuture<Integer> dimensionsAsync()
      Returns the number of dimensions of vectors
      Returns:
      dimensions count
    • getVectorAsync

      RFuture<List<Double>> getVectorAsync(String name)
      Retrieves approximate vector associated with a given element name
      Parameters:
      name - element name
      Returns:
      list of vector coordinates
    • getRawVectorAsync

      RFuture<List<Object>> getRawVectorAsync(String name)
      Retrieves raw internal representation of the approximate vector associated with a given element name
      Parameters:
      name - element name
      Returns:
      list of raw vector values
    • getAttributesAsync

      <T> RFuture<T> getAttributesAsync(String name, Class<T> clazz)
      Retrieves attributes associated with a given element name
      Parameters:
      name - element name
      clazz - type for deserialization
      Returns:
      attributes
    • getInfoAsync

      RFuture<VectorInfo> getInfoAsync()
      Returns metadata for this vector set
      Returns:
      vector set information
    • getNeighborsAsync

      RFuture<List<String>> getNeighborsAsync(String element)
      Retrieves the neighbors of a specified element by name
      Parameters:
      element - element name
      Returns:
      list of neighbor element names
    • getNeighborEntriesAsync

      RFuture<List<ScoredEntry<String>>> getNeighborEntriesAsync(String element)
      Retrieves the neighbors with scores of a specified element by name
      Parameters:
      element - element name
      Returns:
      list of neighbor elements with scores
    • randomAsync

      RFuture<String> randomAsync()
      Returns a random element name
      Returns:
      random element name
    • randomAsync

      RFuture<List<String>> randomAsync(int count)
      Returns random element names
      Parameters:
      count - number of elements to return
      Returns:
      list of random element names
    • removeAsync

      RFuture<Boolean> removeAsync(String element)
      Removes an element by name
      Parameters:
      element - element name to remove
      Returns:
      true if element was removed, false otherwise
    • setAttributesAsync

      RFuture<Boolean> setAttributesAsync(String element, Object attributes)
      Sets attributes for an element by name
      Parameters:
      element - element name
      attributes - attributes
      Returns:
      true if attributes were set, false otherwise
    • getSimilarAsync

      RFuture<List<String>> getSimilarAsync(VectorSimilarArgs args)
      Retrieves element names similar to a specified vector or element
      Parameters:
      args - vector similarity arguments
      Returns:
      list of similar element names
    • getSimilarEntriesAsync

      RFuture<List<ScoredEntry<String>>> getSimilarEntriesAsync(VectorSimilarArgs args)
      Retrieves element names with scores similar to a given vector or element
      Parameters:
      args - similarity arguments
      Returns:
      list of similar element names with scores
    • getSimilarEntriesWithAttributesAsync

      RFuture<List<ScoreAttributesEntry<String>>> getSimilarEntriesWithAttributesAsync(VectorSimilarArgs args)
      Retrieves element names with scores and attributes similar to a given vector or element
      Parameters:
      args - similarity arguments
      Returns:
      list of similar element names with scores and attributes