Package org.redisson.api
Interface RVectorSetReactive
- All Superinterfaces:
RExpirableReactive,RObjectReactive
Reactive interface for Vector Set
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Boolean> add(VectorAddArgs args) Adds an elementreactor.core.publisher.Mono<Integer> Returns the number of dimensions of vectors<T> reactor.core.publisher.Mono<T> getAttributes(String name, Class<T> clazz) Retrieves attributes associated with a given element namereactor.core.publisher.Mono<VectorInfo> getInfo()Returns metadata for this vector setreactor.core.publisher.Mono<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 elementreactor.core.publisher.Mono<List<ScoredEntry<String>>> Retrieves element names with scores similar to a given vector or elementreactor.core.publisher.Mono<List<ScoreAttributesEntry<String>>> Retrieves element names with scores and attributes similar to a given vector or elementRetrieves approximate vector associated with a given element namereactor.core.publisher.Mono<String> random()Returns a random element namerandom(int count) Returns random element namesreactor.core.publisher.Mono<Boolean> Removes an element by namereactor.core.publisher.Mono<Boolean> setAttributes(String element, Object attributes) Sets attributes for an element by namereactor.core.publisher.Mono<Integer> size()Returns the number of elementsMethods inherited from interface org.redisson.api.RExpirableReactive
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLiveMethods inherited from interface org.redisson.api.RObjectReactive
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
reactor.core.publisher.Mono<Integer> size()Returns the number of elements- Returns:
- number of elements
-
dimensions
reactor.core.publisher.Mono<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
reactor.core.publisher.Mono<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
reactor.core.publisher.Mono<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
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
reactor.core.publisher.Mono<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
-