K - Key type.V - Value type.public class RedisAdvancedClusterReactiveCommandsImpl<K,V> extends AbstractRedisReactiveCommands<K,V> implements RedisAdvancedClusterReactiveCommands<K,V>
| Constructor and Description |
|---|
RedisAdvancedClusterReactiveCommandsImpl(StatefulRedisClusterConnection<K,V> connection,
RedisCodec<K,V> codec)
Initialize a new connection.
|
RedisAdvancedClusterReactiveCommandsImpl(StatefulRedisClusterConnection<K,V> connection,
RedisCodec<K,V> codec,
Supplier<JsonParser> parser)
Initialize a new connection.
|
RedisAdvancedClusterReactiveCommandsImpl(StatefulRedisClusterConnectionImpl<K,V> connection,
RedisCodec<K,V> codec)
Deprecated.
|
RedisAdvancedClusterReactiveCommandsImpl(StatefulRedisClusterConnectionImpl<K,V> connection,
RedisCodec<K,V> codec,
Supplier<JsonParser> parser)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
Mono<String> |
clientSetname(K name)
Set the current connection name.
|
Mono<Long> |
clusterCountKeysInSlot(int slot)
Returns the number of keys in the specified Redis Cluster hash
slot. |
Flux<K> |
clusterGetKeysInSlot(int slot,
int count)
Retrieve the list of keys within the
slot. |
Mono<Long> |
dbsize()
Return the number of keys in the selected database.
|
Mono<Long> |
del(Iterable<K> keys) |
Mono<Long> |
del(K... keys)
Delete one or more keys.
|
protected <T> Map<String,org.reactivestreams.Publisher<T>> |
executeOnNodes(Function<RedisClusterReactiveCommands<K,V>,? extends org.reactivestreams.Publisher<T>> function,
Predicate<RedisClusterNode> filter)
Run a command on all available nodes that match
filter. |
protected <T> Map<String,org.reactivestreams.Publisher<T>> |
executeOnUpstream(Function<RedisClusterReactiveCommands<K,V>,? extends org.reactivestreams.Publisher<T>> function)
Run a command on all available masters,
|
Mono<Long> |
exists(Iterable<K> keys) |
Mono<Long> |
exists(K... keys)
Determine how many keys exist.
|
Mono<String> |
flushall()
Remove all keys from all databases.
|
Mono<String> |
flushall(FlushMode flushMode)
Remove all keys from all databases using the specified
FlushMode. |
Mono<String> |
flushallAsync()
Remove all keys asynchronously from all databases.
|
Mono<String> |
flushdb()
Remove all keys from the current database.
|
Mono<String> |
flushdb(FlushMode flushMode)
Remove all keys from the current database using the specified
FlushMode. |
Mono<AggregationReply<K,V>> |
ftAggregate(String index,
V query)
Run a search query on an index and perform basic aggregate transformations using default options.
|
Mono<AggregationReply<K,V>> |
ftAggregate(String index,
V query,
AggregateArgs<K,V> args)
Run a search query on an index and perform advanced aggregate transformations with a processing pipeline.
|
Mono<String> |
ftAliasadd(String alias,
String index)
Add an alias to a search index.
|
Mono<String> |
ftAliasdel(String alias)
Remove an alias from a search index.
|
Mono<String> |
ftAliasupdate(String alias,
String index)
Update an existing alias to point to a different search index.
|
Mono<String> |
ftAlter(String index,
boolean skipInitialScan,
List<FieldArgs<K>> fieldArgs)
Add new attributes to an existing search index.
|
Mono<String> |
ftAlter(String index,
List<FieldArgs<K>> fieldArgs)
Add new attributes to an existing search index.
|
Mono<String> |
ftCreate(String index,
CreateArgs<K,V> arguments,
List<FieldArgs<K>> fieldArgs)
Create a new search index with the given name, custom configuration, and field definitions.
|
Mono<String> |
ftCreate(String index,
List<FieldArgs<K>> fieldArgs)
Create a new search index with the given name and field definitions using default settings.
|
Mono<String> |
ftCursordel(String index,
AggregationReply.Cursor cursor)
Delete a cursor and free its associated resources.
|
Mono<AggregationReply<K,V>> |
ftCursorread(String index,
AggregationReply.Cursor cursor)
Read next results from an existing cursor using the default batch size.
|
Mono<AggregationReply<K,V>> |
ftCursorread(String index,
AggregationReply.Cursor cursor,
int count)
Read next results from an existing cursor and optionally override the batch size.
|
Mono<Long> |
ftDictadd(String dict,
V... terms)
Add terms to a dictionary.
|
Mono<Long> |
ftDictdel(String dict,
V... terms)
Delete terms from a dictionary.
|
Flux<V> |
ftDictdump(String dict)
Dump all terms in a dictionary.
|
Mono<String> |
ftDropindex(String index)
Drop a search index without deleting the associated documents.
|
Mono<String> |
ftDropindex(String index,
boolean deleteDocumentKeys)
Drop a search index with optional document deletion.
|
Mono<String> |
ftExplain(String index,
V query)
Return the execution plan for a complex query.
|
Mono<String> |
ftExplain(String index,
V query,
ExplainArgs<K,V> args)
Return the execution plan for a complex query with additional options.
|
Flux<V> |
ftList()
Return a list of all existing indexes.
|
Mono<SearchReply<K,V>> |
ftSearch(String index,
V query)
Search the index with a textual query using default search options.
|
Mono<SearchReply<K,V>> |
ftSearch(String index,
V query,
SearchArgs<K,V> args)
Search the index with a textual query using advanced search options and filters.
|
Mono<SpellCheckResult<V>> |
ftSpellcheck(String index,
V query)
Perform spelling correction on a query, returning suggestions for misspelled terms.
|
Mono<SpellCheckResult<V>> |
ftSpellcheck(String index,
V query,
SpellCheckArgs<K,V> args)
Perform spelling correction on a query with additional options.
|
Mono<Map<V,List<V>>> |
ftSyndump(String index)
Dump synonym group contents.
|
Mono<String> |
ftSynupdate(String index,
V synonymGroupId,
SynUpdateArgs<K,V> args,
V... terms)
Update a synonym group with additional terms and options.
|
Mono<String> |
ftSynupdate(String index,
V synonymGroupId,
V... terms)
Update a synonym group with additional terms.
|
Flux<V> |
ftTagvals(String index,
String fieldName)
Return a distinct set of values indexed in a Tag field.
|
RedisClusterReactiveCommands<K,V> |
getConnection(String nodeId)
Retrieve a connection to the specified cluster node using the nodeId.
|
RedisClusterReactiveCommands<K,V> |
getConnection(String host,
int port)
Retrieve a connection to the specified cluster node using host and port.
|
StatefulRedisClusterConnection<K,V> |
getStatefulConnection() |
Mono<Long> |
keys(KeyStreamingChannel<K> channel,
String pattern)
Find all keys matching the given pattern.
|
Flux<K> |
keys(String pattern)
Find all keys matching the given pattern.
|
Flux<K> |
keysLegacy(K pattern)
Deprecated.
Use
keys(String) instead. This legacy overload will be removed in a later version. |
Mono<Long> |
keysLegacy(KeyStreamingChannel<K> channel,
K pattern)
Deprecated.
Use
keys(String) instead. This legacy overload will be removed in a later version. |
Flux<KeyValue<K,V>> |
mget(Iterable<K> keys) |
Flux<KeyValue<K,V>> |
mget(K... keys)
Get the values of all the given keys.
|
Mono<Long> |
mget(KeyValueStreamingChannel<K,V> channel,
Iterable<K> keys) |
Mono<Long> |
mget(KeyValueStreamingChannel<K,V> channel,
K... keys)
Stream over the values of all the given keys.
|
Mono<String> |
mset(Map<K,V> map)
Set multiple keys to multiple values.
|
Mono<Boolean> |
msetnx(Map<K,V> map)
Set multiple keys to multiple values, only if none of the keys exist.
|
Mono<K> |
randomkey()
Return a random key from the keyspace.
|
Mono<KeyScanCursor<K>> |
scan()
Incrementally iterate the keys space.
|
Mono<StreamScanCursor> |
scan(KeyStreamingChannel<K> channel)
Incrementally iterate the keys space.
|
Mono<StreamScanCursor> |
scan(KeyStreamingChannel<K> channel,
ScanArgs scanArgs)
Incrementally iterate the keys space.
|
Mono<StreamScanCursor> |
scan(KeyStreamingChannel<K> channel,
ScanCursor scanCursor)
Incrementally iterate the keys space.
|
Mono<StreamScanCursor> |
scan(KeyStreamingChannel<K> channel,
ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate the keys space.
|
Mono<KeyScanCursor<K>> |
scan(ScanArgs scanArgs)
Incrementally iterate the keys space.
|
Mono<KeyScanCursor<K>> |
scan(ScanCursor scanCursor)
Incrementally iterate the keys space.
|
Mono<KeyScanCursor<K>> |
scan(ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate the keys space.
|
Mono<String> |
scriptFlush()
Remove all the scripts from the script cache.
|
Mono<String> |
scriptKill()
Kill the script currently in execution.
|
Mono<String> |
scriptLoad(byte[] script)
Load the specified Lua script into the script cache.
|
Mono<Void> |
shutdown(boolean save)
Synchronously save the dataset to disk and then shut down the server.
|
Mono<Long> |
touch(Iterable<K> keys) |
Mono<Long> |
touch(K... keys)
Touch one or more keys.
|
Mono<Long> |
unlink(Iterable<K> keys) |
Mono<Long> |
unlink(K... keys)
Unlink one or more keys (non blocking DEL).
|
aclCat, aclCat, aclDeluser, aclDryRun, aclDryRun, aclGenpass, aclGenpass, aclGetuser, aclList, aclLoad, aclLog, aclLog, aclLogReset, aclSave, aclSetuser, aclUsers, aclWhoami, append, asking, auth, auth, bgrewriteaof, bgsave, bitcount, bitcount, bitfield, bitopAnd, bitopAndor, bitopDiff, bitopDiff1, bitopNot, bitopOne, bitopOr, bitopXor, bitpos, bitpos, bitpos, blmove, blmove, blmpop, blmpop, blpop, blpop, brpop, brpop, brpoplpush, brpoplpush, bzmpop, bzmpop, bzmpop, bzmpop, bzpopmax, bzpopmax, bzpopmin, bzpopmin, clientCaching, clientGetname, clientGetredir, clientId, clientInfo, clientKill, clientKill, clientList, clientList, clientNoEvict, clientPause, clientSetinfo, clientTracking, clientTrackinginfo, clientUnblock, clusterAddSlots, clusterAddSlotsRange, clusterBumpepoch, clusterCountFailureReports, clusterDelSlots, clusterDelSlotsRange, clusterFailover, clusterFailover, clusterFlushslots, clusterForget, clusterInfo, clusterKeyslot, clusterLinks, clusterMeet, clusterMyId, clusterMyShardId, clusterNodes, clusterReplicas, clusterReplicate, clusterReset, clusterSaveconfig, clusterSetConfigEpoch, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode, clusterSetSlotStable, clusterShards, clusterSlaves, clusterSlots, command, commandCount, commandInfo, commandInfo, configGet, configGet, configResetstat, configRewrite, configSet, configSet, copy, copy, createDissolvingFlux, createFlux, createMono, createMono, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, decr, decrby, digest, digest, discard, dispatch, dispatch, dump, echo, eval, eval, eval, eval, evalReadOnly, evalReadOnly, evalsha, evalsha, evalshaReadOnly, exec, exists, expire, expire, expire, expire, expireat, expireat, expireat, expireat, expireat, expireat, expiretime, fcall, fcall, fcallReadOnly, fcallReadOnly, flushdbAsync, ftSugadd, ftSugadd, ftSugdel, ftSugget, ftSugget, ftSuglen, functionDump, functionFlush, functionKill, functionList, functionList, functionLoad, functionLoad, functionRestore, functionRestore, geoadd, geoadd, geoadd, geoadd, geoadd, geoadd, geodist, geohash, geopos, georadius_ro, georadius_ro, georadius, georadius, georadius, georadiusbymember_ro, georadiusbymember_ro, georadiusbymember, georadiusbymember, georadiusbymember, geosearch, geosearch, geosearchstore, get, getbit, getConnection, getdel, getex, getJsonParser, getrange, getset, hdel, hexists, hexpire, hexpire, hexpire, hexpire, hexpireat, hexpireat, hexpireat, hexpireat, hexpireat, hexpireat, hexpiretime, hget, hgetall, hgetall, hgetdel, hgetdel, hgetex, hgetex, hgetex, hincrby, hincrbyfloat, hkeys, hkeys, hlen, hmget, hmget, hmset, hpersist, hpexpire, hpexpire, hpexpire, hpexpire, hpexpireat, hpexpireat, hpexpireat, hpexpireat, hpexpireat, hpexpireat, hpexpiretime, hpttl, hrandfield, hrandfield, hrandfieldWithvalues, hrandfieldWithvalues, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hscanNovalues, hscanNovalues, hscanNovalues, hscanNovalues, hscanNovalues, hscanNovalues, hscanNovalues, hscanNovalues, hset, hset, hsetex, hsetex, hsetnx, hstrlen, httl, hvals, hvals, incr, incrby, incrbyfloat, info, info, jsonArrappend, jsonArrappend, jsonArrappend, jsonArrappend, jsonArrindex, jsonArrindex, jsonArrindex, jsonArrindex, jsonArrinsert, jsonArrinsert, jsonArrlen, jsonArrlen, jsonArrpop, jsonArrpop, jsonArrpop, jsonArrpopRaw, jsonArrpopRaw, jsonArrpopRaw, jsonArrtrim, jsonClear, jsonClear, jsonDel, jsonDel, jsonGet, jsonGet, jsonGetRaw, jsonGetRaw, jsonMerge, jsonMerge, jsonMGet, jsonMGetRaw, jsonMSet, jsonNumincrby, jsonObjkeys, jsonObjkeys, jsonObjlen, jsonObjlen, jsonSet, jsonSet, jsonSet, jsonSet, jsonStrappend, jsonStrappend, jsonStrappend, jsonStrappend, jsonStrlen, jsonStrlen, jsonToggle, jsonType, jsonType, lastsave, lcs, lindex, linsert, llen, lmove, lmpop, lpop, lpop, lpos, lpos, lpos, lpos, lpush, lpushx, lrange, lrange, lrem, lset, ltrim, memoryUsage, mget, migrate, migrate, move, multi, objectEncoding, objectFreq, objectIdletime, objectRefcount, persist, pexpire, pexpire, pexpire, pexpire, pexpireat, pexpireat, pexpireat, pexpireat, pexpireat, pexpireat, pexpiretime, pfadd, pfadd, pfcount, pfcount, pfmerge, pfmerge, ping, psetex, pttl, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, pubsubShardChannels, pubsubShardChannels, pubsubShardNumsub, quit, readOnly, readWrite, rename, renamenx, replicaof, replicaofNoOne, restore, restore, role, rpop, rpop, rpoplpush, rpush, rpushx, sadd, save, scard, scriptExists, scriptFlush, scriptLoad, sdiff, sdiff, sdiffstore, select, set, set, setbit, setex, setGet, setGet, setnx, setrange, setTimeout, shutdown, sinter, sinter, sintercard, sintercard, sinterstore, sismember, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, smembers, smembers, smismember, smove, sort, sort, sort, sort, sortReadOnly, sortReadOnly, sortReadOnly, sortReadOnly, sortStore, spop, spop, spublish, srandmember, srandmember, srandmember, srem, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sscan, stralgoLcs, strlen, sunion, sunion, sunionstore, swapdb, time, ttl, type, unwatch, vadd, vadd, vadd, vadd, vcard, vClearAttributes, vdim, vemb, vembRaw, vgetattr, vgetattrAsJsonValue, vinfo, vlinks, vlinksWithScores, vrandmember, vrandmember, vrem, vsetattr, vsetattr, vsim, vsim, vsim, vsim, vsimWithScore, vsimWithScore, vsimWithScore, vsimWithScore, vsimWithScoreWithAttribs, vsimWithScoreWithAttribs, vsimWithScoreWithAttribs, vsimWithScoreWithAttribs, waitForReplication, watch, xack, xackdel, xackdel, xadd, xadd, xadd, xadd, xautoclaim, xclaim, xclaim, xdel, xdelex, xdelex, xgroupCreate, xgroupCreate, xgroupCreateconsumer, xgroupDelconsumer, xgroupDestroy, xgroupSetid, xinfoConsumers, xinfoGroups, xinfoStream, xlen, xpending, xpending, xpending, xpending, xrange, xrange, xread, xread, xreadgroup, xreadgroup, xrevrange, xrevrange, xtrim, xtrim, xtrim, zadd, zadd, zadd, zadd, zadd, zadd, zaddincr, zaddincr, zcard, zcount, zcount, zcount, zdiff, zdiffstore, zdiffWithScores, zincrby, zinter, zinter, zintercard, zintercard, zinterstore, zinterstore, zinterWithScores, zinterWithScores, zlexcount, zlexcount, zmpop, zmpop, zmscore, zpopmax, zpopmax, zpopmin, zpopmin, zrandmember, zrandmember, zrandmemberWithScores, zrandmemberWithScores, zrange, zrange, zrangebylex, zrangebylex, zrangebylex, zrangebylex, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangestore, zrangestorebylex, zrangestorebyscore, zrangeWithScores, zrangeWithScores, zrank, zrankWithScore, zrem, zremrangebylex, zremrangebylex, zremrangebyrank, zremrangebyscore, zremrangebyscore, zremrangebyscore, zrevrange, zrevrange, zrevrangebylex, zrevrangebylex, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangestore, zrevrangestorebylex, zrevrangestorebyscore, zrevrangeWithScores, zrevrangeWithScores, zrevrank, zrevrankWithScore, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscore, zunion, zunion, zunionstore, zunionstore, zunionWithScores, zunionWithScoresclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitscriptLoadasking, auth, auth, clusterAddSlots, clusterAddSlotsRange, clusterBumpepoch, clusterCountFailureReports, clusterDelSlots, clusterDelSlotsRange, clusterFailover, clusterFailover, clusterFlushslots, clusterForget, clusterInfo, clusterKeyslot, clusterLinks, clusterMeet, clusterMyId, clusterMyShardId, clusterNodes, clusterReplicas, clusterReplicate, clusterReset, clusterSaveconfig, clusterSetConfigEpoch, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode, clusterSetSlotStable, clusterShards, clusterSlaves, clusterSlots, readOnly, readWrite, setTimeoutdispatch, dispatch, echo, getJsonParser, ping, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, pubsubShardChannels, pubsubShardChannels, pubsubShardNumsub, quit, role, spublish, waitForReplicationaclCat, aclCat, aclDeluser, aclDryRun, aclDryRun, aclGenpass, aclGenpass, aclGetuser, aclList, aclLoad, aclLog, aclLog, aclLogReset, aclSave, aclSetuser, aclUsers, aclWhoamifcall, fcall, fcallReadOnly, fcallReadOnly, functionDump, functionFlush, functionKill, functionList, functionList, functionLoad, functionLoad, functionRestore, functionRestoregeoadd, geoadd, geoadd, geoadd, geoadd, geoadd, geodist, geohash, geopos, georadius, georadius, georadius, georadiusbymember, georadiusbymember, georadiusbymember, geosearch, geosearch, geosearchstorehdel, hexists, hexpire, hexpire, hexpire, hexpire, hexpireat, hexpireat, hexpireat, hexpireat, hexpireat, hexpireat, hexpiretime, hget, hgetall, hgetall, hgetdel, hgetdel, hgetex, hgetex, hgetex, hincrby, hincrbyfloat, hkeys, hkeys, hlen, hmget, hmget, hmset, hpersist, hpexpire, hpexpire, hpexpire, hpexpire, hpexpireat, hpexpireat, hpexpireat, hpexpireat, hpexpireat, hpexpireat, hpexpiretime, hpttl, hrandfield, hrandfield, hrandfieldWithvalues, hrandfieldWithvalues, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hscanNovalues, hscanNovalues, hscanNovalues, hscanNovalues, hscanNovalues, hscanNovalues, hscanNovalues, hscanNovalues, hset, hset, hsetex, hsetex, hsetnx, hstrlen, httl, hvals, hvalspfadd, pfcount, pfmergecopy, copy, dump, expire, expire, expire, expire, expireat, expireat, expireat, expireat, expireat, expireat, expiretime, migrate, migrate, move, objectEncoding, objectFreq, objectIdletime, objectRefcount, persist, pexpire, pexpire, pexpire, pexpire, pexpireat, pexpireat, pexpireat, pexpireat, pexpireat, pexpireat, pexpiretime, pttl, rename, renamenx, restore, restore, sort, sort, sort, sort, sortReadOnly, sortReadOnly, sortReadOnly, sortReadOnly, sortStore, ttl, typeblmove, blmove, blmpop, blmpop, blpop, blpop, brpop, brpop, brpoplpush, brpoplpush, lindex, linsert, llen, lmove, lmpop, lpop, lpop, lpos, lpos, lpos, lpos, lpush, lpushx, lrange, lrange, lrem, lset, ltrim, rpop, rpop, rpoplpush, rpush, rpushxdigest, digest, eval, eval, eval, eval, evalReadOnly, evalReadOnly, evalsha, evalsha, evalshaReadOnly, scriptExists, scriptFlushbgrewriteaof, bgsave, clientCaching, clientGetname, clientGetredir, clientId, clientInfo, clientKill, clientKill, clientList, clientList, clientNoEvict, clientPause, clientSetinfo, clientTracking, clientTrackinginfo, clientUnblock, command, commandCount, commandInfo, commandInfo, configGet, configGet, configResetstat, configRewrite, configSet, configSet, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, flushdbAsync, info, info, lastsave, memoryUsage, replicaof, replicaofNoOne, save, shutdown, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, timesadd, scard, sdiff, sdiff, sdiffstore, sinter, sinter, sintercard, sintercard, sinterstore, sismember, smembers, smembers, smismember, smove, spop, spop, srandmember, srandmember, srandmember, srem, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sunion, sunion, sunionstorebzmpop, bzmpop, bzmpop, bzmpop, bzpopmax, bzpopmax, bzpopmin, bzpopmin, zadd, zadd, zadd, zadd, zadd, zadd, zaddincr, zaddincr, zcard, zcount, zcount, zcount, zdiff, zdiffstore, zdiffWithScores, zincrby, zinter, zinter, zintercard, zintercard, zinterstore, zinterstore, zinterWithScores, zinterWithScores, zlexcount, zlexcount, zmpop, zmpop, zmscore, zpopmax, zpopmax, zpopmin, zpopmin, zrandmember, zrandmember, zrandmemberWithScores, zrandmemberWithScores, zrange, zrange, zrangebylex, zrangebylex, zrangebylex, zrangebylex, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangestore, zrangestorebylex, zrangestorebyscore, zrangeWithScores, zrangeWithScores, zrank, zrankWithScore, zrem, zremrangebylex, zremrangebylex, zremrangebyrank, zremrangebyscore, zremrangebyscore, zremrangebyscore, zrevrange, zrevrange, zrevrangebylex, zrevrangebylex, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangestore, zrevrangestorebylex, zrevrangestorebyscore, zrevrangeWithScores, zrevrangeWithScores, zrevrank, zrevrankWithScore, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscore, zunion, zunion, zunionstore, zunionstore, zunionWithScores, zunionWithScoresxack, xackdel, xackdel, xadd, xadd, xadd, xadd, xautoclaim, xclaim, xclaim, xdel, xdelex, xdelex, xgroupCreate, xgroupCreate, xgroupCreateconsumer, xgroupDelconsumer, xgroupDestroy, xgroupSetid, xinfoConsumers, xinfoGroups, xinfoStream, xlen, xpending, xpending, xpending, xpending, xrange, xrange, xread, xread, xreadgroup, xreadgroup, xrevrange, xrevrange, xtrim, xtrim, xtrimappend, bitcount, bitcount, bitfield, bitopAnd, bitopAndor, bitopDiff, bitopDiff1, bitopNot, bitopOne, bitopOr, bitopXor, bitpos, bitpos, bitpos, decr, decrby, get, getbit, getdel, getex, getrange, getset, incr, incrby, incrbyfloat, lcs, psetex, set, set, setbit, setex, setGet, setGet, setnx, setrange, stralgoLcs, strlenjsonArrappend, jsonArrappend, jsonArrappend, jsonArrappend, jsonArrindex, jsonArrindex, jsonArrindex, jsonArrindex, jsonArrinsert, jsonArrinsert, jsonArrlen, jsonArrlen, jsonArrpop, jsonArrpop, jsonArrpop, jsonArrpopRaw, jsonArrpopRaw, jsonArrpopRaw, jsonArrtrim, jsonClear, jsonClear, jsonDel, jsonDel, jsonGet, jsonGet, jsonGetRaw, jsonGetRaw, jsonMerge, jsonMerge, jsonMGet, jsonMGetRaw, jsonMSet, jsonNumincrby, jsonObjkeys, jsonObjkeys, jsonObjlen, jsonObjlen, jsonSet, jsonSet, jsonSet, jsonSet, jsonStrappend, jsonStrappend, jsonStrappend, jsonStrappend, jsonStrlen, jsonStrlen, jsonToggle, jsonType, jsonTypevadd, vadd, vadd, vadd, vcard, vClearAttributes, vdim, vemb, vembRaw, vgetattr, vgetattrAsJsonValue, vinfo, vlinks, vlinksWithScores, vrandmember, vrandmember, vrem, vsetattr, vsetattr, vsim, vsim, vsim, vsim, vsimWithScore, vsimWithScore, vsimWithScore, vsimWithScore, vsimWithScoreWithAttribs, vsimWithScoreWithAttribs, vsimWithScoreWithAttribs, vsimWithScoreWithAttribs@Deprecated public RedisAdvancedClusterReactiveCommandsImpl(StatefulRedisClusterConnectionImpl<K,V> connection, RedisCodec<K,V> codec, Supplier<JsonParser> parser)
RedisAdvancedClusterReactiveCommandsImpl(StatefulRedisClusterConnection, RedisCodec, Supplier).connection - the stateful connection.codec - Codec used to encode/decode keys and values.parser - the implementation of the JsonParser to use@Deprecated public RedisAdvancedClusterReactiveCommandsImpl(StatefulRedisClusterConnectionImpl<K,V> connection, RedisCodec<K,V> codec)
RedisAdvancedClusterReactiveCommandsImpl(StatefulRedisClusterConnection, RedisCodec, Supplier).connection - the stateful connection.codec - Codec used to encode/decode keys and values.public RedisAdvancedClusterReactiveCommandsImpl(StatefulRedisClusterConnection<K,V> connection, RedisCodec<K,V> codec, Supplier<JsonParser> parser)
connection - the stateful connection.codec - Codec used to encode/decode keys and values.parser - the implementation of the JsonParser to usepublic RedisAdvancedClusterReactiveCommandsImpl(StatefulRedisClusterConnection<K,V> connection, RedisCodec<K,V> codec)
connection - the stateful connection.codec - Codec used to encode/decode keys and values.public Mono<String> clientSetname(K name)
RedisServerReactiveCommandsclientSetname in interface RedisServerReactiveCommands<K,V>clientSetname in interface RedisAdvancedClusterReactiveCommands<K,V>clientSetname in class AbstractRedisReactiveCommands<K,V>name - the client name.OK if the connection name was successfully set.RedisServerReactiveCommands.clientSetname(Object)public Mono<Long> clusterCountKeysInSlot(int slot)
RedisClusterReactiveCommandsslot.clusterCountKeysInSlot in interface RedisClusterReactiveCommands<K,V>clusterCountKeysInSlot in class AbstractRedisReactiveCommands<K,V>slot - the slotpublic Flux<K> clusterGetKeysInSlot(int slot, int count)
RedisClusterReactiveCommandsslot.clusterGetKeysInSlot in interface RedisClusterReactiveCommands<K,V>clusterGetKeysInSlot in class AbstractRedisReactiveCommands<K,V>slot - the slotcount - maximal number of keyspublic Mono<Long> dbsize()
RedisServerReactiveCommandsdbsize in interface RedisServerReactiveCommands<K,V>dbsize in interface RedisAdvancedClusterReactiveCommands<K,V>dbsize in class AbstractRedisReactiveCommands<K,V>RedisServerReactiveCommands.dbsize()public Mono<Long> del(K... keys)
RedisKeyReactiveCommandsdel in interface RedisKeyReactiveCommands<K,V>del in interface RedisAdvancedClusterReactiveCommands<K,V>del in class AbstractRedisReactiveCommands<K,V>keys - the keys.RedisKeyReactiveCommands.del(Object[])public Mono<Long> del(Iterable<K> keys)
del in class AbstractRedisReactiveCommands<K,V>public Mono<Long> exists(K... keys)
RedisKeyReactiveCommandsexists in interface RedisKeyReactiveCommands<K,V>exists in interface RedisAdvancedClusterReactiveCommands<K,V>exists in class AbstractRedisReactiveCommands<K,V>keys - the keys.public Mono<Long> exists(Iterable<K> keys)
exists in class AbstractRedisReactiveCommands<K,V>public Mono<String> flushall()
RedisServerReactiveCommandsflushall in interface RedisServerReactiveCommands<K,V>flushall in interface RedisAdvancedClusterReactiveCommands<K,V>flushall in class AbstractRedisReactiveCommands<K,V>RedisServerReactiveCommands.flushall()public Mono<String> flushall(FlushMode flushMode)
RedisServerReactiveCommandsFlushMode.flushall in interface RedisServerReactiveCommands<K,V>flushall in class AbstractRedisReactiveCommands<K,V>flushMode - the flush mode (sync/async).public Mono<String> flushallAsync()
RedisServerReactiveCommandsflushallAsync in interface RedisServerReactiveCommands<K,V>flushallAsync in interface RedisAdvancedClusterReactiveCommands<K,V>flushallAsync in class AbstractRedisReactiveCommands<K,V>RedisServerReactiveCommands.flushallAsync()public Mono<String> flushdb()
RedisServerReactiveCommandsflushdb in interface RedisServerReactiveCommands<K,V>flushdb in interface RedisAdvancedClusterReactiveCommands<K,V>flushdb in class AbstractRedisReactiveCommands<K,V>RedisServerReactiveCommands.flushdb()public Mono<String> flushdb(FlushMode flushMode)
RedisServerReactiveCommandsFlushMode.flushdb in interface RedisServerReactiveCommands<K,V>flushdb in class AbstractRedisReactiveCommands<K,V>flushMode - the flush mode (sync/async).public Flux<K> keys(String pattern)
RedisKeyReactiveCommandskeys in interface RedisKeyReactiveCommands<K,V>keys in interface RedisAdvancedClusterReactiveCommands<K,V>keys in class AbstractRedisReactiveCommands<K,V>pattern - the pattern type.pattern.@Deprecated public Flux<K> keysLegacy(K pattern)
keys(String) instead. This legacy overload will be removed in a later version.keysLegacy in interface RedisKeyReactiveCommands<K,V>keysLegacy in interface RedisAdvancedClusterReactiveCommands<K,V>keysLegacy in class AbstractRedisReactiveCommands<K,V>pattern - the pattern type: patternkey (pattern).pattern.public Mono<Long> keys(KeyStreamingChannel<K> channel, String pattern)
RedisKeyReactiveCommandskeys in interface RedisKeyReactiveCommands<K,V>keys in interface RedisAdvancedClusterReactiveCommands<K,V>keys in class AbstractRedisReactiveCommands<K,V>channel - the channel.pattern - the pattern type.pattern.@Deprecated public Mono<Long> keysLegacy(KeyStreamingChannel<K> channel, K pattern)
keys(String) instead. This legacy overload will be removed in a later version.keysLegacy in interface RedisKeyReactiveCommands<K,V>keysLegacy in interface RedisAdvancedClusterReactiveCommands<K,V>keysLegacy in class AbstractRedisReactiveCommands<K,V>channel - the channel.pattern - the pattern.pattern.public Flux<KeyValue<K,V>> mget(K... keys)
RedisStringReactiveCommandsmget in interface RedisStringReactiveCommands<K,V>mget in interface RedisAdvancedClusterReactiveCommands<K,V>mget in class AbstractRedisReactiveCommands<K,V>keys - the key.RedisStringReactiveCommands.mget(Object[])public Flux<KeyValue<K,V>> mget(Iterable<K> keys)
mget in class AbstractRedisReactiveCommands<K,V>public Mono<Long> mget(KeyValueStreamingChannel<K,V> channel, K... keys)
RedisStringReactiveCommandsmget in interface RedisStringReactiveCommands<K,V>mget in class AbstractRedisReactiveCommands<K,V>channel - the channel.keys - the keys.public Mono<Long> mget(KeyValueStreamingChannel<K,V> channel, Iterable<K> keys)
mget in class AbstractRedisReactiveCommands<K,V>public Mono<Boolean> msetnx(Map<K,V> map)
RedisStringReactiveCommandsmsetnx in interface RedisStringReactiveCommands<K,V>msetnx in interface RedisAdvancedClusterReactiveCommands<K,V>msetnx in class AbstractRedisReactiveCommands<K,V>map - the map.1 if the all the keys were set. 0 if no key was set (at least one key already existed).RedisStringReactiveCommands.msetnx(Map)public Mono<String> mset(Map<K,V> map)
RedisStringReactiveCommandsmset in interface RedisStringReactiveCommands<K,V>mset in interface RedisAdvancedClusterReactiveCommands<K,V>mset in class AbstractRedisReactiveCommands<K,V>map - the map.OK since MSET can't fail.RedisStringReactiveCommands.mset(Map)public Mono<K> randomkey()
RedisKeyReactiveCommandsrandomkey in interface RedisKeyReactiveCommands<K,V>randomkey in interface RedisAdvancedClusterReactiveCommands<K,V>randomkey in class AbstractRedisReactiveCommands<K,V>null when the database is empty.RedisKeyReactiveCommands.randomkey()public Mono<String> scriptFlush()
RedisScriptingReactiveCommandsscriptFlush in interface RedisScriptingReactiveCommands<K,V>scriptFlush in interface RedisAdvancedClusterReactiveCommands<K,V>scriptFlush in class AbstractRedisReactiveCommands<K,V>RedisScriptingReactiveCommands.scriptFlush()public Mono<String> scriptKill()
RedisScriptingReactiveCommandsscriptKill in interface RedisScriptingReactiveCommands<K,V>scriptKill in interface RedisAdvancedClusterReactiveCommands<K,V>scriptKill in class AbstractRedisReactiveCommands<K,V>RedisScriptingReactiveCommands.scriptKill()public Mono<String> scriptLoad(byte[] script)
RedisScriptingReactiveCommandsscriptLoad in interface RedisScriptingReactiveCommands<K,V>scriptLoad in interface RedisAdvancedClusterReactiveCommands<K,V>scriptLoad in class AbstractRedisReactiveCommands<K,V>script - script content.public Mono<Void> shutdown(boolean save)
RedisServerReactiveCommandsshutdown in interface RedisServerReactiveCommands<K,V>shutdown in interface RedisAdvancedClusterReactiveCommands<K,V>shutdown in class AbstractRedisReactiveCommands<K,V>save - true force save operation.RedisServerReactiveCommands.shutdown(boolean)public Mono<Long> touch(K... keys)
RedisKeyReactiveCommandstouch in interface RedisKeyReactiveCommands<K,V>touch in interface RedisAdvancedClusterReactiveCommands<K,V>touch in class AbstractRedisReactiveCommands<K,V>keys - the keys.public Mono<Long> touch(Iterable<K> keys)
touch in class AbstractRedisReactiveCommands<K,V>public Mono<Long> unlink(K... keys)
RedisKeyReactiveCommandsunlink in interface RedisKeyReactiveCommands<K,V>unlink in interface RedisAdvancedClusterReactiveCommands<K,V>unlink in class AbstractRedisReactiveCommands<K,V>keys - the keys.RedisKeyReactiveCommands.unlink(Object[])public Mono<Long> unlink(Iterable<K> keys)
unlink in class AbstractRedisReactiveCommands<K,V>public RedisClusterReactiveCommands<K,V> getConnection(String nodeId)
RedisAdvancedClusterReactiveCommandsRedisAdvancedClusterReactiveCommands, node-connections do not route commands to other cluster
nodesgetConnection in interface RedisAdvancedClusterReactiveCommands<K,V>nodeId - the node Idpublic RedisClusterReactiveCommands<K,V> getConnection(String host, int port)
RedisAdvancedClusterReactiveCommandsRedisAdvancedClusterReactiveCommands, node-connections do not route commands to other cluster nodes. Host and
port connections are verified by default for cluster membership, see
ClusterClientOptions.isValidateClusterNodeMembership().getConnection in interface RedisAdvancedClusterReactiveCommands<K,V>host - the hostport - the portpublic StatefulRedisClusterConnection<K,V> getStatefulConnection()
getStatefulConnection in interface RedisAdvancedClusterReactiveCommands<K,V>public Mono<KeyScanCursor<K>> scan()
RedisKeyReactiveCommandsscan in interface RedisKeyReactiveCommands<K,V>scan in interface RedisAdvancedClusterReactiveCommands<K,V>scan in class AbstractRedisReactiveCommands<K,V>RedisKeyReactiveCommands.scan(ScanArgs)public Mono<KeyScanCursor<K>> scan(ScanArgs scanArgs)
RedisKeyReactiveCommandsKeyScanArgs to specify SCAN-specific arguments.scan in interface RedisKeyReactiveCommands<K,V>scan in interface RedisAdvancedClusterReactiveCommands<K,V>scan in class AbstractRedisReactiveCommands<K,V>scanArgs - scan arguments.KeyScanArgspublic Mono<KeyScanCursor<K>> scan(ScanCursor scanCursor, ScanArgs scanArgs)
RedisKeyReactiveCommandsKeyScanArgs to specify SCAN-specific arguments.scan in interface RedisKeyReactiveCommands<K,V>scan in interface RedisAdvancedClusterReactiveCommands<K,V>scan in class AbstractRedisReactiveCommands<K,V>scanCursor - cursor to resume from a previous scan, must not be null.scanArgs - scan arguments.KeyScanArgspublic Mono<KeyScanCursor<K>> scan(ScanCursor scanCursor)
RedisKeyReactiveCommandsscan in interface RedisKeyReactiveCommands<K,V>scan in interface RedisAdvancedClusterReactiveCommands<K,V>scan in class AbstractRedisReactiveCommands<K,V>scanCursor - cursor to resume from a previous scan, must not be null.RedisKeyReactiveCommands.scan(ScanCursor)public Mono<StreamScanCursor> scan(KeyStreamingChannel<K> channel)
RedisKeyReactiveCommandsscan in interface RedisKeyReactiveCommands<K,V>scan in interface RedisAdvancedClusterReactiveCommands<K,V>scan in class AbstractRedisReactiveCommands<K,V>channel - streaming channel that receives a call for every key.RedisKeyReactiveCommands.scan(KeyStreamingChannel)public Mono<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanArgs scanArgs)
RedisKeyReactiveCommandsKeyScanArgs to specify SCAN-specific arguments.scan in interface RedisKeyReactiveCommands<K,V>scan in interface RedisAdvancedClusterReactiveCommands<K,V>scan in class AbstractRedisReactiveCommands<K,V>channel - streaming channel that receives a call for every key.scanArgs - scan arguments.KeyScanArgspublic Mono<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor, ScanArgs scanArgs)
RedisKeyReactiveCommandsKeyScanArgs to specify SCAN-specific arguments.scan in interface RedisKeyReactiveCommands<K,V>scan in interface RedisAdvancedClusterReactiveCommands<K,V>scan in class AbstractRedisReactiveCommands<K,V>channel - streaming channel that receives a call for every key.scanCursor - cursor to resume from a previous scan, must not be null.scanArgs - scan arguments.KeyScanArgspublic Mono<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor)
RedisKeyReactiveCommandsscan in interface RedisKeyReactiveCommands<K,V>scan in interface RedisAdvancedClusterReactiveCommands<K,V>scan in class AbstractRedisReactiveCommands<K,V>channel - streaming channel that receives a call for every key.scanCursor - cursor to resume from a previous scan, must not be null.RedisKeyReactiveCommands.scan(ScanCursor, ScanArgs)public Mono<AggregationReply<K,V>> ftAggregate(String index, V query, AggregateArgs<K,V> args)
RediSearchReactiveCommands
This command executes a search query and applies a sophisticated aggregation pipeline to transform, group, sort, and
analyze the results. The AggregateArgs parameter defines a series of operations that process the data
server-side, enabling powerful analytics and data transformation capabilities directly within Redis.
The aggregation pipeline supports the following operations:
Time complexity: Non-deterministic, depends on the query and aggregation operations performed. Generally linear to the number of results processed through the pipeline.
ftAggregate in interface RediSearchReactiveCommands<K,V>ftAggregate in class AbstractRedisReactiveCommands<K,V>index - the index name, as a keyquery - the base filtering query that retrieves documents for aggregationargs - the aggregate arguments defining the processing pipeline and operationsSearchReplySearchReply,
AggregateArgs,
RediSearchReactiveCommands.ftAggregate(String, Object),
#ftCursorread(String, Cursor)public Mono<AggregationReply<K,V>> ftAggregate(String index, V query)
RediSearchReactiveCommands
This command executes a search query and applies aggregation operations to transform and analyze the results. Unlike
RediSearchReactiveCommands.ftSearch(String, Object), which returns individual documents, FT.AGGREGATE processes the result set through a
pipeline of transformations to produce analytical insights, summaries, and computed values.
This basic variant uses default aggregation behavior without additional pipeline operations. For advanced aggregations
with grouping, sorting, filtering, and custom transformations, use RediSearchReactiveCommands.ftAggregate(String, Object, AggregateArgs).
Common use cases for aggregations include:
Time complexity: O(1) base complexity, but depends on the query and number of results processed
ftAggregate in interface RediSearchReactiveCommands<K,V>ftAggregate in class AbstractRedisReactiveCommands<K,V>index - the index name, as a keyquery - the base filtering query that retrieves documents for aggregationSearchReplySearchReply,
AggregateArgs,
RediSearchReactiveCommands.ftAggregate(String, Object, AggregateArgs)public Mono<SearchReply<K,V>> ftSearch(String index, V query, SearchArgs<K,V> args)
RediSearchReactiveCommands
This command performs a full-text search on the specified index with advanced configuration options provided through
SearchArgs. This variant allows fine-grained control over search behavior, result formatting, filtering, sorting,
and pagination.
The SearchArgs parameter enables you to specify:
Time complexity: O(N) where N is the number of results in the result set. Complexity varies based on query type, filters, and sorting requirements.
ftSearch in interface RediSearchReactiveCommands<K,V>ftSearch in class AbstractRedisReactiveCommands<K,V>index - the index name, as a keyquery - the query string following RediSearch query syntaxargs - the search arguments containing advanced options and filtersSearchReplySearchReply,
SearchArgs,
RediSearchReactiveCommands.ftSearch(String, Object)public Mono<SearchReply<K,V>> ftSearch(String index, V query)
RediSearchReactiveCommandsThis command performs a full-text search on the specified index using the provided query string. It returns matching documents with their content and metadata. This is the basic search variant that uses default search behavior without additional filtering, sorting, or result customization.
The query follows RediSearch query syntax, supporting:
"hello world" - searches for documents containing both terms"@title:redis" - searches within specific fields"redis AND search" or "redis | search""\"exact phrase\"" - searches for exact phrase matches"redi*" - prefix matching"@price:[100 200]" - numeric field filtering"@location:[lon lat radius unit]" - geo-spatial queriesTime complexity: O(N) where N is the number of results in the result set
ftSearch in interface RediSearchReactiveCommands<K,V>ftSearch in class AbstractRedisReactiveCommands<K,V>index - the index name, as a keyquery - the query string following RediSearch query syntaxSearchReplySearchReply,
SearchArgs,
RediSearchReactiveCommands.ftSearch(String, Object, SearchArgs)public Mono<String> ftExplain(String index, V query)
RediSearchReactiveCommandsThis command returns a string representing the execution plan that Redis Search will use to execute the given query. This is useful for understanding how the query will be processed and for optimizing query performance.
Key features and use cases:
Time complexity: O(1)
ftExplain in interface RediSearchReactiveCommands<K,V>ftExplain in class AbstractRedisReactiveCommands<K,V>index - the index namequery - the search query to explainRediSearchReactiveCommands.ftExplain(String, Object, ExplainArgs),
RediSearchReactiveCommands.ftSearch(String, Object)public Mono<String> ftExplain(String index, V query, ExplainArgs<K,V> args)
RediSearchReactiveCommandsThis command returns a string representing the execution plan that Redis Search will use to execute the given query under the specified dialect version.
Available options:
Time complexity: O(1)
ftExplain in interface RediSearchReactiveCommands<K,V>ftExplain in class AbstractRedisReactiveCommands<K,V>index - the index namequery - the search query to explainargs - the explain arguments (dialect)RediSearchReactiveCommands.ftExplain(String, Object),
RediSearchReactiveCommands.ftSearch(String, Object)public Flux<V> ftTagvals(String index, String fieldName)
RediSearchReactiveCommandsThis command retrieves all unique values that have been indexed in a specific Tag field within a search index. It's particularly useful for discovering the range of values available in categorical fields such as cities, categories, status values, or any other enumerated data.
Key features and use cases:
Important limitations:
Example usage scenarios:
Time complexity: O(N) where N is the number of distinct values in the tag field
ftTagvals in interface RediSearchReactiveCommands<K,V>ftTagvals in class AbstractRedisReactiveCommands<K,V>index - the index name containing the tag fieldfieldName - the name of the Tag field defined in the index schemaRediSearchReactiveCommands.ftCreate(String, List),
RediSearchReactiveCommands.ftCreate(String, CreateArgs, List)public Mono<SpellCheckResult<V>> ftSpellcheck(String index, V query)
RediSearchReactiveCommandsThis command analyzes the query for misspelled terms and provides spelling suggestions based on the indexed terms and optionally custom dictionaries. A misspelled term is a full text term (word) that is:
Key features and use cases:
Time complexity: O(1)
ftSpellcheck in interface RediSearchReactiveCommands<K,V>ftSpellcheck in class AbstractRedisReactiveCommands<K,V>index - the index with the indexed termsquery - the search query to check for spelling errorsRediSearchReactiveCommands.ftSpellcheck(String, Object, SpellCheckArgs),
RediSearchReactiveCommands.ftDictadd(String, Object[]),
RediSearchReactiveCommands.ftDictdel(String, Object[]),
RediSearchReactiveCommands.ftDictdump(String)public Mono<SpellCheckResult<V>> ftSpellcheck(String index, V query, SpellCheckArgs<K,V> args)
RediSearchReactiveCommandsThis command analyzes the query for misspelled terms and provides spelling suggestions with configurable options for distance, custom dictionaries, and dialect.
Available options:
Time complexity: O(1)
ftSpellcheck in interface RediSearchReactiveCommands<K,V>ftSpellcheck in class AbstractRedisReactiveCommands<K,V>index - the index with the indexed termsquery - the search query to check for spelling errorsargs - the spellcheck arguments (distance, terms, dialect)RediSearchReactiveCommands.ftSpellcheck(String, Object),
RediSearchReactiveCommands.ftDictadd(String, Object[]),
RediSearchReactiveCommands.ftDictdel(String, Object[]),
RediSearchReactiveCommands.ftDictdump(String)public Mono<Long> ftDictadd(String dict, V... terms)
RediSearchReactiveCommandsThis command adds one or more terms to a dictionary. Dictionaries are used for storing custom stopwords, synonyms, and other term lists that can be referenced in search operations. The dictionary is created if it doesn't exist.
Key features and use cases:
Time complexity: O(1)
ftDictadd in interface RediSearchReactiveCommands<K,V>ftDictadd in class AbstractRedisReactiveCommands<K,V>dict - the dictionary nameterms - the terms to add to the dictionaryRediSearchReactiveCommands.ftDictdel(String, Object[]),
RediSearchReactiveCommands.ftDictdump(String)public Mono<Long> ftDictdel(String dict, V... terms)
RediSearchReactiveCommandsThis command removes one or more terms from a dictionary. Only exact matches will be removed from the dictionary. Non-existent terms are ignored.
Time complexity: O(1)
ftDictdel in interface RediSearchReactiveCommands<K,V>ftDictdel in class AbstractRedisReactiveCommands<K,V>dict - the dictionary nameterms - the terms to delete from the dictionaryRediSearchReactiveCommands.ftDictadd(String, Object[]),
RediSearchReactiveCommands.ftDictdump(String)public Flux<V> ftDictdump(String dict)
RediSearchReactiveCommandsThis command returns all terms stored in the specified dictionary. The terms are returned in no particular order.
Time complexity: O(N), where N is the size of the dictionary
ftDictdump in interface RediSearchReactiveCommands<K,V>ftDictdump in class AbstractRedisReactiveCommands<K,V>dict - the dictionary nameRediSearchReactiveCommands.ftDictadd(String, Object[]),
RediSearchReactiveCommands.ftDictdel(String, Object[])public Mono<String> ftAliasadd(String alias, String index)
RediSearchReactiveCommandsThis command creates an alias that points to an existing search index, allowing applications to reference the index by an alternative name. Aliases provide a level of indirection that enables transparent index management and migration strategies.
Key features and use cases:
Important notes:
RediSearchReactiveCommands.ftAliasupdate(String, String) to reassign an existing aliasTime complexity: O(1)
ftAliasadd in interface RediSearchReactiveCommands<K,V>ftAliasadd in class AbstractRedisReactiveCommands<K,V>alias - the alias name to createindex - the target index name that the alias will point to"OK" if the alias was successfully createdRediSearchReactiveCommands.ftAliasupdate(String, String),
RediSearchReactiveCommands.ftAliasdel(String)public Mono<String> ftAliasupdate(String alias, String index)
RediSearchReactiveCommands
This command updates an existing alias to point to a different index, or creates the alias if it doesn't exist. Unlike
RediSearchReactiveCommands.ftAliasadd(String, String), this command will succeed even if the alias already exists, making it useful for
atomic alias updates during index migrations.
Key features and use cases:
Important notes:
ftAliasadd)Time complexity: O(1)
ftAliasupdate in interface RediSearchReactiveCommands<K,V>ftAliasupdate in class AbstractRedisReactiveCommands<K,V>alias - the alias name to update or createindex - the target index name that the alias will point to"OK" if the alias was successfully updatedRediSearchReactiveCommands.ftAliasadd(String, String),
RediSearchReactiveCommands.ftAliasdel(String)public Mono<String> ftAliasdel(String alias)
RediSearchReactiveCommandsThis command removes an existing alias, breaking the association between the alias name and its target index. The underlying index remains unchanged and accessible by its original name.
Key features and use cases:
Important notes:
RediSearchReactiveCommands.ftAliasupdate(String, String) to redirect before deletionTime complexity: O(1)
ftAliasdel in interface RediSearchReactiveCommands<K,V>ftAliasdel in class AbstractRedisReactiveCommands<K,V>alias - the alias name to remove"OK" if the alias was successfully removedRediSearchReactiveCommands.ftAliasadd(String, String),
RediSearchReactiveCommands.ftAliasupdate(String, String)public Mono<String> ftCreate(String index, List<FieldArgs<K>> fieldArgs)
RediSearchReactiveCommandsThis command creates a new search index that enables full-text search, filtering, and aggregation capabilities on Redis data structures. The index will use default settings for data type (HASH), key prefixes (all keys), and other configuration options.
Time complexity: O(K) at creation where K is the number of fields, O(N) if scanning the keyspace is triggered, where N is the number of keys in the keyspace
ftCreate in interface RediSearchReactiveCommands<K,V>ftCreate in class AbstractRedisReactiveCommands<K,V>index - the index namefieldArgs - the FieldArgs list defining the searchable fields and their types"OK" if the index was created successfullyCreateArgs,
FieldArgs,
RediSearchReactiveCommands.ftCreate(String, CreateArgs, List),
RediSearchReactiveCommands.ftDropindex(String)public Mono<String> ftCreate(String index, CreateArgs<K,V> arguments, List<FieldArgs<K>> fieldArgs)
RediSearchReactiveCommandsThis command creates a new search index with advanced configuration options that control how the index behaves, what data it indexes, and how it processes documents. This variant provides full control over index creation parameters.
The CreateArgs parameter allows you to specify:
Time complexity: O(K) at creation where K is the number of fields, O(N) if scanning the keyspace is triggered, where N is the number of keys in the keyspace
ftCreate in interface RediSearchReactiveCommands<K,V>ftCreate in class AbstractRedisReactiveCommands<K,V>index - the index namearguments - the index CreateArgs containing configuration optionsfieldArgs - the FieldArgs list defining the searchable fields and their types"OK" if the index was created successfullyCreateArgs,
FieldArgs,
RediSearchReactiveCommands.ftCreate(String, List),
RediSearchReactiveCommands.ftDropindex(String)public Mono<String> ftAlter(String index, boolean skipInitialScan, List<FieldArgs<K>> fieldArgs)
RediSearchReactiveCommandsThis command allows you to extend an existing search index by adding new searchable fields without recreating the entire index. The new attributes will be applied to future document updates and can optionally be applied to existing documents through reindexing.
Key features and considerations:
Important notes:
MAXTEXTFIELDS, you may be limited to 32 total text attributesSKIPINITIALSCAN to avoid scanning existing documents if immediate indexing is not required
Time complexity: O(N) where N is the number of keys in the keyspace if initial scan is performed, O(1)
if SKIPINITIALSCAN is used
ftAlter in interface RediSearchReactiveCommands<K,V>ftAlter in class AbstractRedisReactiveCommands<K,V>index - the index name, as a keyskipInitialScan - if true, skip scanning and indexing existing documents; if false, scan and index
existing documents with the new attributesfieldArgs - the FieldArgs list defining the new searchable fields and their types to add"OK" if the index was successfully alteredFieldArgs,
RediSearchReactiveCommands.ftCreate(String, List),
RediSearchReactiveCommands.ftCreate(String, CreateArgs, List)public Mono<String> ftAlter(String index, List<FieldArgs<K>> fieldArgs)
RediSearchReactiveCommandsThis command allows you to extend an existing search index by adding new searchable fields without recreating the entire index. The new attributes will be applied to future document updates and can optionally be applied to existing documents through reindexing.
Key features and considerations:
Time complexity: O(N) where N is the number of keys in the keyspace if initial scan is performed
ftAlter in interface RediSearchReactiveCommands<K,V>ftAlter in class AbstractRedisReactiveCommands<K,V>index - the index name, as a keyfieldArgs - the FieldArgs list defining the new searchable fields and their types to add"OK" if the index was successfully alteredFieldArgs,
RediSearchReactiveCommands.ftCreate(String, List),
RediSearchReactiveCommands.ftCreate(String, CreateArgs, List)public Mono<String> ftDropindex(String index, boolean deleteDocumentKeys)
RediSearchReactiveCommands
This command removes the search index and optionally deletes all associated documents. When deleteDocuments is
true, this operation becomes destructive and will permanently remove both the index and all indexed documents
from Redis.
Asynchronous Behavior: If an index creation is still running (RediSearchReactiveCommands.ftCreate(String, List) is running
asynchronously), only the document hashes that have already been indexed are deleted. Documents that are queued for
indexing but not yet processed will remain in the database.
Time complexity: O(1) or O(N) if documents are deleted, where N is the number of keys in the keyspace
ftDropindex in interface RediSearchReactiveCommands<K,V>ftDropindex in class AbstractRedisReactiveCommands<K,V>index - the index name, as a keydeleteDocumentKeys - if true, delete the indexed documents as well; if false, preserve documents"OK" if the index was successfully droppedRediSearchReactiveCommands.ftDropindex(String),
RediSearchReactiveCommands.ftCreate(String, List)public Mono<String> ftDropindex(String index)
RediSearchReactiveCommandsThis command removes the search index and all its associated metadata, but preserves the original documents (hashes or JSON objects) that were indexed. This is the safe default behavior that allows you to recreate the index later without losing data.
Time complexity: O(1)
ftDropindex in interface RediSearchReactiveCommands<K,V>ftDropindex in class AbstractRedisReactiveCommands<K,V>index - the index name, as a key"OK" if the index was successfully droppedRediSearchReactiveCommands.ftDropindex(String, boolean),
RediSearchReactiveCommands.ftCreate(String, List)public Mono<Map<V,List<V>>> ftSyndump(String index)
RediSearchReactiveCommandsThis command returns the contents of a synonym group. Synonym groups are used to define terms that should be treated as equivalent during search operations.
Key features and use cases:
Time complexity: O(1)
ftSyndump in interface RediSearchReactiveCommands<K,V>ftSyndump in class AbstractRedisReactiveCommands<K,V>index - the index nameRediSearchReactiveCommands.ftSynupdate(String, Object, Object[]),
RediSearchReactiveCommands.ftSynupdate(String, Object, SynUpdateArgs, Object[])public Mono<String> ftSynupdate(String index, V synonymGroupId, V... terms)
RediSearchReactiveCommandsThis command creates or updates a synonym group with the specified terms. All terms in a synonym group are treated as equivalent during search operations. The command triggers a scan of all documents by default.
Key features and use cases:
Time complexity: O(1)
ftSynupdate in interface RediSearchReactiveCommands<K,V>ftSynupdate in class AbstractRedisReactiveCommands<K,V>index - the index namesynonymGroupId - the synonym group identifierterms - the terms to add to the synonym groupRediSearchReactiveCommands.ftSynupdate(String, Object, SynUpdateArgs, Object[]),
RediSearchReactiveCommands.ftSyndump(String)public Mono<String> ftSynupdate(String index, V synonymGroupId, SynUpdateArgs<K,V> args, V... terms)
RediSearchReactiveCommandsThis command creates or updates a synonym group with the specified terms and options. The SKIPINITIALSCAN option can be used to avoid scanning existing documents, affecting only documents indexed after the update.
Available options:
Time complexity: O(1)
ftSynupdate in interface RediSearchReactiveCommands<K,V>ftSynupdate in class AbstractRedisReactiveCommands<K,V>index - the index namesynonymGroupId - the synonym group identifierargs - the synupdate arguments (skipInitialScan)terms - the terms to add to the synonym groupRediSearchReactiveCommands.ftSynupdate(String, Object, Object[]),
RediSearchReactiveCommands.ftSyndump(String)public Flux<V> ftList()
RediSearchReactiveCommandsThis command returns an array with the names of all existing indexes in the database. This is useful for discovering available indexes and managing index lifecycle.
Key features and use cases:
Time complexity: O(1)
Note: This is a temporary command (indicated by the underscore prefix). In the future, a SCAN-type command will be added for use when a database contains a large number of indices.
ftList in interface RediSearchReactiveCommands<K,V>ftList in class AbstractRedisReactiveCommands<K,V>#ftCreate(String, CreateArgs, FieldArgs[]),
RediSearchReactiveCommands.ftDropindex(String)public Mono<AggregationReply<K,V>> ftCursorread(String index, AggregationReply.Cursor cursor, int count)
RediSearchReactiveCommands
This command is used to read the next batch of results from a cursor that was created by
RediSearchReactiveCommands.ftAggregate(String, Object, AggregateArgs) with the WITHCURSOR option. Cursors provide an efficient way
to iterate through large result sets without loading all results into memory at once.
The count parameter overrides the COUNT value specified in the original FT.AGGREGATE command,
allowing you to control the batch size for this specific read operation.
Time complexity: O(1)
ftCursorread in interface RediSearchReactiveCommands<K,V>ftCursorread in class AbstractRedisReactiveCommands<K,V>index - the index namecursor - the cursor obtained from a previous FT.AGGREGATE or FT.CURSOR READ commandcount - the number of results to read; overrides the COUNT from FT.AGGREGATEMono emitting the next batch of results; see AggregationReplyAggregationReply,
RediSearchReactiveCommands.ftAggregate(String, Object, AggregateArgs)public Mono<AggregationReply<K,V>> ftCursorread(String index, AggregationReply.Cursor cursor)
RediSearchReactiveCommands
This command is used to read the next batch of results from a cursor created by
RediSearchReactiveCommands.ftAggregate(String, Object, AggregateArgs) with the WITHCURSOR option. This variant uses the default
batch size that was specified in the original FT.AGGREGATE command's WITHCURSOR clause.
Cursors provide an efficient way to iterate through large result sets without loading all results into memory at once.
When the cursor is exhausted (no more results), the returned SearchReply will have a cursor id of 0.
Time complexity: O(1)
ftCursorread in interface RediSearchReactiveCommands<K,V>ftCursorread in class AbstractRedisReactiveCommands<K,V>index - the index namecursor - the cursor obtained from a previous FT.AGGREGATE or FT.CURSOR READ commandMono emitting the next batch of results; see AggregationReplyAggregationReply,
RediSearchReactiveCommands.ftAggregate(String, Object, AggregateArgs)public Mono<String> ftCursordel(String index, AggregationReply.Cursor cursor)
RediSearchReactiveCommands
This command is used to explicitly delete a cursor created by RediSearchReactiveCommands.ftAggregate(String, Object, AggregateArgs) with
the WITHCURSOR option. Deleting a cursor frees up server resources and should be done when you no longer need to
read more results from the cursor.
Important: Cursors have a default timeout and may be automatically deleted by Redis if not accessed within the timeout period. However, it's good practice to explicitly delete cursors when you're finished with them to free up resources immediately.
Once a cursor is deleted, any subsequent attempts to read from it using #ftCursorread(String, Cursor) or
#ftCursorread(String, Cursor, int) will result in an error.
Time complexity: O(1)
ftCursordel in interface RediSearchReactiveCommands<K,V>ftCursordel in class AbstractRedisReactiveCommands<K,V>index - the index name, as a keycursor - the cursor obtained from a previous FT.AGGREGATE or FT.CURSOR READ commandMono emitting "OK" if the cursor was successfully deletedRediSearchReactiveCommands.ftAggregate(String, Object, AggregateArgs),
#ftCursorread(String, Cursor),
#ftCursorread(String, Cursor, int)protected <T> Map<String,org.reactivestreams.Publisher<T>> executeOnUpstream(Function<RedisClusterReactiveCommands<K,V>,? extends org.reactivestreams.Publisher<T>> function)
T - result typefunction - function producing the commandprotected <T> Map<String,org.reactivestreams.Publisher<T>> executeOnNodes(Function<RedisClusterReactiveCommands<K,V>,? extends org.reactivestreams.Publisher<T>> function, Predicate<RedisClusterNode> filter)
filter.T - result typefunction - function producing the commandfilter - filter function for the node selectionCopyright © 2025 lettuce.io. All rights reserved.