Package org.redisson.api
Interface RVectorSetRx
- All Superinterfaces:
RExpirableRx,RObjectRx
Async interface for Vector Set
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single<Boolean> add(VectorAddArgs args) Adds an elementio.reactivex.rxjava3.core.Single<Integer> Returns the number of dimensions of vectors<T> io.reactivex.rxjava3.core.Maybe<T> getAttributes(String name, Class<T> clazz) Retrieves attributes associated with a given element nameio.reactivex.rxjava3.core.Single<VectorInfo> getInfo()Returns metadata for this vector setio.reactivex.rxjava3.core.Single<List<ScoredEntry<String>>> getNeighborEntries(String element) Retrieves the neighbors with scores of a specified element by namegetNeighbors(String element) Retrieves the neighbors of a specified element by namegetRawVector(String name) Retrieves raw internal representation of the approximate vector associated with a given element namegetSimilar(VectorSimilarArgs args) Retrieves element names similar to a specified vector or elementio.reactivex.rxjava3.core.Single<List<ScoredEntry<String>>> Retrieves element names with scores similar to a given vector or elementio.reactivex.rxjava3.core.Single<List<ScoreAttributesEntry<String>>> Retrieves element names with scores and attributes similar to a given vector or elementRetrieves approximate vector associated with a given element nameio.reactivex.rxjava3.core.Maybe<String> random()Returns a random element namerandom(int count) Returns random element namesio.reactivex.rxjava3.core.Single<Boolean> Removes an element by nameio.reactivex.rxjava3.core.Single<Boolean> setAttributes(String element, Object attributes) Sets attributes for an element by nameio.reactivex.rxjava3.core.Single<Integer> size()Returns the number of elementsMethods inherited from interface org.redisson.api.RExpirableRx
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLiveMethods inherited from interface org.redisson.api.RObjectRx
addListener, copy, copy, copy, copyAndReplace, copyAndReplace, delete, dump, getAccessFrequency, getCodec, getIdleTime, getInternalEncoding, getName, getReferenceCount, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
Method Details
-
add
Adds an element- Parameters:
args- add arguments- Returns:
trueif element was added andfalseif 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
Retrieves approximate vector associated with a given element name- Parameters:
name- element name- Returns:
- list of vector coordinates
-
getRawVector
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
Retrieves attributes associated with a given element name- Parameters:
name- element nameclazz- type for deserialization- Returns:
- attributes
-
getInfo
io.reactivex.rxjava3.core.Single<VectorInfo> getInfo()Returns metadata for this vector set- Returns:
- vector set information
-
getNeighbors
Retrieves the neighbors of a specified element by name- Parameters:
element- element name- Returns:
- list of neighbor element names
-
getNeighborEntries
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
Returns random element names- Parameters:
count- number of elements to return- Returns:
- list of random element names
-
remove
Removes an element by name- Parameters:
element- element name to remove- Returns:
trueif element was removed,falseotherwise
-
setAttributes
Sets attributes for an element by name- Parameters:
element- element nameattributes- attributes- Returns:
trueif attributes were set,falseotherwise
-
getSimilar
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
-