Interface RVectorSetRx

All Superinterfaces:
RExpirableRx, RObjectRx

public interface RVectorSetRx extends RExpirableRx
Async interface for Vector Set
Author:
Nikita Koksharov
  • Method Details

    • add

      io.reactivex.rxjava3.core.Single<Boolean> add(VectorAddArgs args)
      Adds an element
      Parameters:
      args - add arguments
      Returns:
      true if element was added and false if updated
    • size

      io.reactivex.rxjava3.core.Single<Integer> size()
      Returns the number of elements
      Returns:
      number of elements
    • dimensions

      io.reactivex.rxjava3.core.Single<Integer> dimensions()
      Returns the number of dimensions of vectors
      Returns:
      dimensions count
    • getVector

      io.reactivex.rxjava3.core.Single<List<Double>> getVector(String name)
      Retrieves approximate vector associated with a given element name
      Parameters:
      name - element name
      Returns:
      list of vector coordinates
    • getRawVector

      io.reactivex.rxjava3.core.Single<List<Object>> getRawVector(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
    • getAttributes

      <T> io.reactivex.rxjava3.core.Maybe<T> getAttributes(String name, Class<T> clazz)
      Retrieves attributes associated with a given element name
      Parameters:
      name - element name
      clazz - type for deserialization
      Returns:
      attributes
    • getInfo

      io.reactivex.rxjava3.core.Single<VectorInfo> getInfo()
      Returns metadata for this vector set
      Returns:
      vector set information
    • getNeighbors

      io.reactivex.rxjava3.core.Single<List<String>> getNeighbors(String element)
      Retrieves the neighbors of a specified element by name
      Parameters:
      element - element name
      Returns:
      list of neighbor element names
    • getNeighborEntries

      io.reactivex.rxjava3.core.Single<List<ScoredEntry<String>>> getNeighborEntries(String element)
      Retrieves the neighbors with scores of a specified element by name
      Parameters:
      element - element name
      Returns:
      list of neighbor elements with scores
    • random

      io.reactivex.rxjava3.core.Maybe<String> random()
      Returns a random element name
      Returns:
      random element name
    • random

      io.reactivex.rxjava3.core.Single<List<String>> random(int count)
      Returns random element names
      Parameters:
      count - number of elements to return
      Returns:
      list of random element names
    • remove

      io.reactivex.rxjava3.core.Single<Boolean> remove(String element)
      Removes an element by name
      Parameters:
      element - element name to remove
      Returns:
      true if element was removed, false otherwise
    • setAttributes

      io.reactivex.rxjava3.core.Single<Boolean> setAttributes(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
    • getSimilar

      io.reactivex.rxjava3.core.Single<List<String>> getSimilar(VectorSimilarArgs args)
      Retrieves element names similar to a specified vector or element
      Parameters:
      args - vector similarity arguments
      Returns:
      list of similar element names
    • getSimilarEntries

      io.reactivex.rxjava3.core.Single<List<ScoredEntry<String>>> getSimilarEntries(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
    • getSimilarEntriesWithAttributes

      io.reactivex.rxjava3.core.Single<List<ScoreAttributesEntry<String>>> getSimilarEntriesWithAttributes(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