K - Key type.V - Value type.public class RedisAdvancedClusterAsyncCommandsImpl<K,V> extends AbstractRedisAsyncCommands<K,V> implements RedisAdvancedClusterAsyncCommands<K,V>
| Constructor and Description |
|---|
RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnection<K,V> connection,
RedisCodec<K,V> codec)
Initialize a new connection.
|
RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnection<K,V> connection,
RedisCodec<K,V> codec,
Supplier<JsonParser> parser)
Initialize a new connection.
|
RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnectionImpl<K,V> connection,
RedisCodec<K,V> codec)
Deprecated.
|
RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnectionImpl<K,V> connection,
RedisCodec<K,V> codec,
Supplier<JsonParser> parser)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
RedisFuture<String> |
clientSetname(K name)
Set the current connection name.
|
RedisFuture<Long> |
clusterCountKeysInSlot(int slot)
Returns the number of keys in the specified Redis Cluster hash
slot. |
RedisFuture<List<K>> |
clusterGetKeysInSlot(int slot,
int count)
Retrieve the list of keys within the
slot. |
RedisFuture<Long> |
dbsize()
Return the number of keys in the selected database.
|
RedisFuture<Long> |
del(Iterable<K> keys) |
RedisFuture<Long> |
del(K... keys)
Delete one or more keys.
|
protected <T> Map<String,CompletableFuture<T>> |
executeOnNodes(Function<RedisClusterAsyncCommands<K,V>,RedisFuture<T>> function,
Function<RedisClusterNode,Boolean> filter)
Run a command on all available nodes that match
filter. |
protected <T> Map<String,CompletableFuture<T>> |
executeOnUpstream(Function<RedisClusterAsyncCommands<K,V>,RedisFuture<T>> function)
Run a command on all available masters,
|
RedisFuture<Long> |
exists(Iterable<K> keys) |
RedisFuture<Long> |
exists(K... keys)
Determine how many keys exist.
|
RedisFuture<String> |
flushall()
Remove all keys from all databases.
|
RedisFuture<String> |
flushall(FlushMode flushMode)
Remove all keys from all databases using the specified
FlushMode. |
RedisFuture<String> |
flushallAsync()
Remove all keys asynchronously from all databases.
|
RedisFuture<String> |
flushdb()
Remove all keys from the current database.
|
RedisFuture<String> |
flushdb(FlushMode flushMode)
Remove all keys from the current database using the specified
FlushMode. |
RedisFuture<AggregationReply<K,V>> |
ftAggregate(String index,
V query)
Run a search query on an index and perform basic aggregate transformations using default options.
|
RedisFuture<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.
|
RedisFuture<String> |
ftAliasadd(String alias,
String index)
Add an alias to a search index.
|
RedisFuture<String> |
ftAliasdel(String alias)
Remove an alias from a search index.
|
RedisFuture<String> |
ftAliasupdate(String alias,
String index)
Update an existing alias to point to a different search index.
|
RedisFuture<String> |
ftAlter(String index,
boolean skipInitialScan,
List<FieldArgs<K>> fieldArgs)
Add new attributes to an existing search index.
|
RedisFuture<String> |
ftAlter(String index,
List<FieldArgs<K>> fieldArgs)
Add new attributes to an existing search index.
|
RedisFuture<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.
|
RedisFuture<String> |
ftCreate(String index,
List<FieldArgs<K>> fieldArgs)
Create a new search index with the given name and field definitions using default settings.
|
RedisFuture<String> |
ftCursordel(String index,
AggregationReply.Cursor cursor)
Delete a cursor and free its associated resources.
|
RedisFuture<AggregationReply<K,V>> |
ftCursorread(String index,
AggregationReply.Cursor cursor)
Read next results from an existing cursor using the default batch size.
|
RedisFuture<AggregationReply<K,V>> |
ftCursorread(String index,
AggregationReply.Cursor cursor,
int count)
Read next results from an existing cursor and optionally override the batch size.
|
RedisFuture<Long> |
ftDictadd(String dict,
V... terms)
Add terms to a dictionary.
|
RedisFuture<Long> |
ftDictdel(String dict,
V... terms)
Delete terms from a dictionary.
|
RedisFuture<List<V>> |
ftDictdump(String dict)
Dump all terms in a dictionary.
|
RedisFuture<String> |
ftDropindex(String index)
Drop a search index without deleting the associated documents.
|
RedisFuture<String> |
ftDropindex(String index,
boolean deleteDocumentKeys)
Drop a search index with optional document deletion.
|
RedisFuture<String> |
ftExplain(String index,
V query)
Return the execution plan for a complex query.
|
RedisFuture<String> |
ftExplain(String index,
V query,
ExplainArgs<K,V> args)
Return the execution plan for a complex query with additional options.
|
RedisFuture<List<V>> |
ftList()
Return a list of all existing indexes.
|
RedisFuture<SearchReply<K,V>> |
ftSearch(String index,
V query)
Search the index with a textual query using default search options.
|
RedisFuture<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.
|
RedisFuture<SpellCheckResult<V>> |
ftSpellcheck(String index,
V query)
Perform spelling correction on a query, returning suggestions for misspelled terms.
|
RedisFuture<SpellCheckResult<V>> |
ftSpellcheck(String index,
V query,
SpellCheckArgs<K,V> args)
Perform spelling correction on a query with additional options.
|
RedisFuture<Map<V,List<V>>> |
ftSyndump(String index)
Dump synonym group contents.
|
RedisFuture<String> |
ftSynupdate(String index,
V synonymGroupId,
SynUpdateArgs<K,V> args,
V... terms)
Update a synonym group with additional terms and options.
|
RedisFuture<String> |
ftSynupdate(String index,
V synonymGroupId,
V... terms)
Update a synonym group with additional terms.
|
RedisFuture<List<V>> |
ftTagvals(String index,
String fieldName)
Return a distinct set of values indexed in a Tag field.
|
RedisClusterAsyncCommands<K,V> |
getConnection(String nodeId)
Retrieve a connection to the specified cluster node using the nodeId.
|
RedisClusterAsyncCommands<K,V> |
getConnection(String host,
int port)
Retrieve a connection to the specified cluster node using host and port.
|
StatefulRedisClusterConnection<K,V> |
getStatefulConnection() |
RedisFuture<List<JsonValue>> |
jsonMGet(JsonPath jsonPath,
K... keys)
Return the values at the specified path from multiple key arguments.
|
RedisFuture<String> |
jsonMSet(List<JsonMsetArgs<K,V>> arguments)
Set or update one or more JSON values according to the specified
JsonMsetArgs
JSON.MSET is atomic, hence, all given additions or updates are either applied or not. |
RedisFuture<Long> |
keys(KeyStreamingChannel<K> channel,
String pattern)
Find all keys matching the given pattern.
|
RedisFuture<List<K>> |
keys(String pattern)
Find all keys matching the given pattern.
|
RedisFuture<List<K>> |
keysLegacy(K pattern)
Deprecated.
Use
keys(String) instead. This legacy overload will be removed in a later version. |
RedisFuture<Long> |
keysLegacy(KeyStreamingChannel<K> channel,
K pattern)
Deprecated.
Use
keys(KeyStreamingChannel, String) instead. This legacy overload will be removed in a later
version. |
RedisFuture<List<KeyValue<K,V>>> |
mget(Iterable<K> keys) |
RedisFuture<List<KeyValue<K,V>>> |
mget(K... keys)
Get the values of all the given keys.
|
RedisFuture<Long> |
mget(KeyValueStreamingChannel<K,V> channel,
Iterable<K> keys) |
RedisFuture<Long> |
mget(KeyValueStreamingChannel<K,V> channel,
K... keys)
Stream over the values of all the given keys.
|
RedisFuture<String> |
mset(Map<K,V> map)
Set multiple keys to multiple values.
|
RedisFuture<Boolean> |
msetnx(Map<K,V> map)
Set multiple keys to multiple values, only if none of the keys exist.
|
AsyncNodeSelection<K,V> |
nodes(Predicate<RedisClusterNode> predicate)
Select nodes by a predicate and keeps a static selection.
|
AsyncNodeSelection<K,V> |
nodes(Predicate<RedisClusterNode> predicate,
boolean dynamic)
Select nodes by a predicate
|
protected AsyncNodeSelection<K,V> |
nodes(Predicate<RedisClusterNode> predicate,
ConnectionIntent connectionIntent,
boolean dynamic) |
RedisFuture<K> |
randomkey()
Return a random key from the keyspace.
|
AsyncNodeSelection<K,V> |
readonly(Predicate<RedisClusterNode> predicate)
Select replica nodes by a predicate and keeps a static selection.
|
RedisFuture<KeyScanCursor<K>> |
scan()
Incrementally iterate the keys space.
|
RedisFuture<StreamScanCursor> |
scan(KeyStreamingChannel<K> channel)
Incrementally iterate the keys space.
|
RedisFuture<StreamScanCursor> |
scan(KeyStreamingChannel<K> channel,
ScanArgs scanArgs)
Incrementally iterate the keys space.
|
RedisFuture<StreamScanCursor> |
scan(KeyStreamingChannel<K> channel,
ScanCursor scanCursor)
Incrementally iterate the keys space.
|
RedisFuture<StreamScanCursor> |
scan(KeyStreamingChannel<K> channel,
ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate the keys space.
|
RedisFuture<KeyScanCursor<K>> |
scan(ScanArgs scanArgs)
Incrementally iterate the keys space.
|
RedisFuture<KeyScanCursor<K>> |
scan(ScanCursor scanCursor)
Incrementally iterate the keys space.
|
RedisFuture<KeyScanCursor<K>> |
scan(ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate the keys space.
|
RedisFuture<String> |
scriptFlush()
Remove all the scripts from the script cache.
|
RedisFuture<String> |
scriptKill()
Kill the script currently in execution.
|
RedisFuture<String> |
scriptLoad(byte[] script)
Load the specified Lua script into the script cache.
|
void |
shutdown(boolean save)
Synchronously save the dataset to disk and then shut down the server.
|
RedisFuture<Long> |
touch(Iterable<K> keys) |
RedisFuture<Long> |
touch(K... keys)
Touch one or more keys.
|
RedisFuture<Long> |
unlink(Iterable<K> keys) |
RedisFuture<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, 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, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, decr, decrby, digest, digest, discard, dispatch, dispatch, dispatch, dispatch, dispatch, dump, echo, eval, eval, eval, eval, evalReadOnly, evalReadOnly, evalsha, evalsha, evalshaReadOnly, exec, 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, jsonMGetRaw, 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, migrate, migrate, move, multi, objectEncoding, objectFreq, objectIdletime, objectRefcount, persist, pexpire, pexpire, pexpire, pexpire, pexpireat, pexpireat, pexpireat, pexpireat, pexpireat, pexpireat, pexpiretime, pfadd, pfcount, 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, waitall, masters, replicas, replicas, scriptLoad, slaves, slaves, upstreamasking, 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, getJsonParser, readOnly, readWrite, setTimeoutdispatch, dispatch, echo, 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, jsonMGetRaw, 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 RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnectionImpl<K,V> connection, RedisCodec<K,V> codec, Supplier<JsonParser> parser)
RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnection, RedisCodec, Supplier).connection - the stateful connectioncodec - Codec used to encode/decode keys and values.parser - the implementation of the JsonParser to use@Deprecated public RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnectionImpl<K,V> connection, RedisCodec<K,V> codec)
RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnection, RedisCodec, Supplier).connection - the stateful connectioncodec - Codec used to encode/decode keys and values.public RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnection<K,V> connection, RedisCodec<K,V> codec, Supplier<JsonParser> parser)
connection - the stateful connectioncodec - Codec used to encode/decode keys and values.parser - the implementation of the JsonParser to usepublic RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnection<K,V> connection, RedisCodec<K,V> codec)
connection - the stateful connectioncodec - Codec used to encode/decode keys and values.public RedisFuture<String> clientSetname(K name)
RedisServerAsyncCommandsclientSetname in interface RedisServerAsyncCommands<K,V>clientSetname in interface RedisAdvancedClusterAsyncCommands<K,V>clientSetname in class AbstractRedisAsyncCommands<K,V>name - the client name.OK if the connection name was successfully set.RedisServerAsyncCommands.clientSetname(Object)public RedisFuture<Long> clusterCountKeysInSlot(int slot)
RedisClusterAsyncCommandsslot.clusterCountKeysInSlot in interface RedisClusterAsyncCommands<K,V>clusterCountKeysInSlot in class AbstractRedisAsyncCommands<K,V>slot - the slotpublic RedisFuture<List<K>> clusterGetKeysInSlot(int slot, int count)
RedisClusterAsyncCommandsslot.clusterGetKeysInSlot in interface RedisClusterAsyncCommands<K,V>clusterGetKeysInSlot in class AbstractRedisAsyncCommands<K,V>slot - the slotcount - maximal number of keyspublic RedisFuture<Long> dbsize()
RedisServerAsyncCommandsdbsize in interface RedisServerAsyncCommands<K,V>dbsize in interface RedisAdvancedClusterAsyncCommands<K,V>dbsize in class AbstractRedisAsyncCommands<K,V>RedisServerAsyncCommands.dbsize()public RedisFuture<Long> del(K... keys)
RedisKeyAsyncCommandsdel in interface RedisKeyAsyncCommands<K,V>del in interface RedisAdvancedClusterAsyncCommands<K,V>del in class AbstractRedisAsyncCommands<K,V>keys - the keys.RedisKeyAsyncCommands.del(Object[])public RedisFuture<Long> del(Iterable<K> keys)
del in class AbstractRedisAsyncCommands<K,V>public RedisFuture<Long> exists(K... keys)
RedisKeyAsyncCommandsexists in interface RedisKeyAsyncCommands<K,V>exists in interface RedisAdvancedClusterAsyncCommands<K,V>exists in class AbstractRedisAsyncCommands<K,V>keys - the keys.public RedisFuture<Long> exists(Iterable<K> keys)
exists in class AbstractRedisAsyncCommands<K,V>public RedisFuture<String> flushall()
RedisServerAsyncCommandsflushall in interface RedisServerAsyncCommands<K,V>flushall in interface RedisAdvancedClusterAsyncCommands<K,V>flushall in class AbstractRedisAsyncCommands<K,V>RedisServerAsyncCommands.flushall()public RedisFuture<String> flushall(FlushMode flushMode)
RedisServerAsyncCommandsFlushMode.flushall in interface RedisServerAsyncCommands<K,V>flushall in class AbstractRedisAsyncCommands<K,V>flushMode - the flush mode (sync/async).public RedisFuture<String> flushallAsync()
RedisServerAsyncCommandsflushallAsync in interface RedisServerAsyncCommands<K,V>flushallAsync in interface RedisAdvancedClusterAsyncCommands<K,V>flushallAsync in class AbstractRedisAsyncCommands<K,V>RedisServerAsyncCommands.flushallAsync()public RedisFuture<String> flushdb()
RedisServerAsyncCommandsflushdb in interface RedisServerAsyncCommands<K,V>flushdb in interface RedisAdvancedClusterAsyncCommands<K,V>flushdb in class AbstractRedisAsyncCommands<K,V>RedisServerAsyncCommands.flushdb()public RedisFuture<String> flushdb(FlushMode flushMode)
RedisServerAsyncCommandsFlushMode.flushdb in interface RedisServerAsyncCommands<K,V>flushdb in class AbstractRedisAsyncCommands<K,V>flushMode - the flush mode (sync/async).public RedisFuture<List<K>> keys(String pattern)
RedisKeyAsyncCommandskeys in interface RedisKeyAsyncCommands<K,V>keys in interface RedisAdvancedClusterAsyncCommands<K,V>keys in class AbstractRedisAsyncCommands<K,V>pattern - the pattern type.pattern.RedisKeyAsyncCommands.keys(String)@Deprecated public RedisFuture<List<K>> keysLegacy(K pattern)
keys(String) instead. This legacy overload will be removed in a later version.keysLegacy in interface RedisKeyAsyncCommands<K,V>keysLegacy in interface RedisAdvancedClusterAsyncCommands<K,V>keysLegacy in class AbstractRedisAsyncCommands<K,V>pattern - the pattern type: patternkey (pattern).pattern.public RedisFuture<Long> keys(KeyStreamingChannel<K> channel, String pattern)
RedisKeyAsyncCommandskeys in interface RedisKeyAsyncCommands<K,V>keys in interface RedisAdvancedClusterAsyncCommands<K,V>keys in class AbstractRedisAsyncCommands<K,V>channel - the channel.pattern - the pattern type.pattern.RedisKeyAsyncCommands.keys(KeyStreamingChannel, String)@Deprecated public RedisFuture<Long> keysLegacy(KeyStreamingChannel<K> channel, K pattern)
keys(KeyStreamingChannel, String) instead. This legacy overload will be removed in a later
version.keysLegacy in interface RedisKeyAsyncCommands<K,V>keysLegacy in interface RedisAdvancedClusterAsyncCommands<K,V>keysLegacy in class AbstractRedisAsyncCommands<K,V>channel - the channel.pattern - the pattern.pattern.public RedisFuture<List<JsonValue>> jsonMGet(JsonPath jsonPath, K... keys)
RedisJsonAsyncCommandsjsonMGet in interface RedisJsonAsyncCommands<K,V>jsonMGet in class AbstractRedisAsyncCommands<K,V>jsonPath - the JsonPath pointing to the value to fetch.keys - the keys holding the JsonValues to fetch.public RedisFuture<List<KeyValue<K,V>>> mget(K... keys)
RedisStringAsyncCommandsmget in interface RedisStringAsyncCommands<K,V>mget in interface RedisAdvancedClusterAsyncCommands<K,V>mget in class AbstractRedisAsyncCommands<K,V>keys - the key.RedisStringAsyncCommands.mget(Object[])public RedisFuture<List<KeyValue<K,V>>> mget(Iterable<K> keys)
mget in class AbstractRedisAsyncCommands<K,V>public RedisFuture<Long> mget(KeyValueStreamingChannel<K,V> channel, K... keys)
RedisStringAsyncCommandsmget in interface RedisStringAsyncCommands<K,V>mget in class AbstractRedisAsyncCommands<K,V>channel - the channel.keys - the keys.public RedisFuture<Long> mget(KeyValueStreamingChannel<K,V> channel, Iterable<K> keys)
mget in class AbstractRedisAsyncCommands<K,V>public RedisFuture<String> jsonMSet(List<JsonMsetArgs<K,V>> arguments)
RedisJsonAsyncCommandsJsonMsetArgs
JSON.MSET is atomic, hence, all given additions or updates are either applied or not. It is not possible for clients to see that some keys were updated while others are unchanged.
A JSON value is a hierarchical structure. If you change a value in a specific path - nested values are affected.
jsonMSet in interface RedisJsonAsyncCommands<K,V>jsonMSet in class AbstractRedisAsyncCommands<K,V>arguments - the JsonMsetArgs specifying the values to change.public RedisFuture<String> mset(Map<K,V> map)
RedisStringAsyncCommandsmset in interface RedisStringAsyncCommands<K,V>mset in interface RedisAdvancedClusterAsyncCommands<K,V>mset in class AbstractRedisAsyncCommands<K,V>map - the map.OK since MSET can't fail.RedisStringAsyncCommands.mset(Map)public RedisFuture<Boolean> msetnx(Map<K,V> map)
RedisStringAsyncCommandsmsetnx in interface RedisStringAsyncCommands<K,V>msetnx in interface RedisAdvancedClusterAsyncCommands<K,V>msetnx in interface RedisClusterAsyncCommands<K,V>msetnx in class AbstractRedisAsyncCommands<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).RedisStringAsyncCommands.msetnx(Map)public RedisFuture<K> randomkey()
RedisKeyAsyncCommandsrandomkey in interface RedisKeyAsyncCommands<K,V>randomkey in interface RedisAdvancedClusterAsyncCommands<K,V>randomkey in class AbstractRedisAsyncCommands<K,V>null when the database is empty.RedisKeyAsyncCommands.randomkey()public RedisFuture<String> scriptFlush()
RedisScriptingAsyncCommandsscriptFlush in interface RedisScriptingAsyncCommands<K,V>scriptFlush in interface RedisAdvancedClusterAsyncCommands<K,V>scriptFlush in class AbstractRedisAsyncCommands<K,V>RedisScriptingAsyncCommands.scriptFlush()public RedisFuture<String> scriptKill()
RedisScriptingAsyncCommandsscriptKill in interface RedisScriptingAsyncCommands<K,V>scriptKill in interface RedisAdvancedClusterAsyncCommands<K,V>scriptKill in class AbstractRedisAsyncCommands<K,V>RedisScriptingAsyncCommands.scriptKill()public RedisFuture<String> scriptLoad(byte[] script)
RedisScriptingAsyncCommandsscriptLoad in interface RedisScriptingAsyncCommands<K,V>scriptLoad in interface RedisAdvancedClusterAsyncCommands<K,V>scriptLoad in class AbstractRedisAsyncCommands<K,V>script - script content.public void shutdown(boolean save)
RedisServerAsyncCommandsshutdown in interface RedisServerAsyncCommands<K,V>shutdown in interface RedisAdvancedClusterAsyncCommands<K,V>shutdown in class AbstractRedisAsyncCommands<K,V>save - true force save operation.RedisServerAsyncCommands.shutdown(boolean)public RedisFuture<Long> touch(K... keys)
RedisKeyAsyncCommandstouch in interface RedisKeyAsyncCommands<K,V>touch in interface RedisAdvancedClusterAsyncCommands<K,V>touch in class AbstractRedisAsyncCommands<K,V>keys - the keys.public RedisFuture<Long> touch(Iterable<K> keys)
touch in class AbstractRedisAsyncCommands<K,V>public RedisFuture<Long> unlink(K... keys)
RedisKeyAsyncCommandsunlink in interface RedisKeyAsyncCommands<K,V>unlink in interface RedisAdvancedClusterAsyncCommands<K,V>unlink in class AbstractRedisAsyncCommands<K,V>keys - the keys.RedisKeyAsyncCommands.unlink(Object[])public RedisFuture<Long> unlink(Iterable<K> keys)
unlink in class AbstractRedisAsyncCommands<K,V>public RedisClusterAsyncCommands<K,V> getConnection(String nodeId)
RedisAdvancedClusterAsyncCommandsRedisAdvancedClusterAsyncCommands, node-connections do not route commands to other cluster
nodesgetConnection in interface RedisAdvancedClusterAsyncCommands<K,V>nodeId - the node Idpublic RedisClusterAsyncCommands<K,V> getConnection(String host, int port)
RedisAdvancedClusterAsyncCommandsRedisAdvancedClusterAsyncCommands, 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 RedisAdvancedClusterAsyncCommands<K,V>host - the hostport - the portpublic StatefulRedisClusterConnection<K,V> getStatefulConnection()
getStatefulConnection in interface RedisAdvancedClusterAsyncCommands<K,V>public AsyncNodeSelection<K,V> nodes(Predicate<RedisClusterNode> predicate)
RedisAdvancedClusterAsyncCommandsNodeSelectionSupport does
not change when the cluster view changes.nodes in interface RedisAdvancedClusterAsyncCommands<K,V>predicate - Predicate to filter nodespredicatepublic AsyncNodeSelection<K,V> readonly(Predicate<RedisClusterNode> predicate)
RedisAdvancedClusterAsyncCommandsNodeSelectionSupport does not change when the cluster view changes.readonly in interface RedisAdvancedClusterAsyncCommands<K,V>predicate - Predicate to filter nodespredicatepublic AsyncNodeSelection<K,V> nodes(Predicate<RedisClusterNode> predicate, boolean dynamic)
RedisAdvancedClusterAsyncCommandsnodes in interface RedisAdvancedClusterAsyncCommands<K,V>predicate - Predicate to filter nodesdynamic - Defines, whether the set of nodes within the NodeSelectionSupport can change when the cluster view
changes.predicateprotected AsyncNodeSelection<K,V> nodes(Predicate<RedisClusterNode> predicate, ConnectionIntent connectionIntent, boolean dynamic)
public RedisFuture<KeyScanCursor<K>> scan()
RedisKeyAsyncCommandsscan in interface RedisKeyAsyncCommands<K,V>scan in interface RedisAdvancedClusterAsyncCommands<K,V>scan in class AbstractRedisAsyncCommands<K,V>RedisKeyAsyncCommands.scan()public RedisFuture<KeyScanCursor<K>> scan(ScanArgs scanArgs)
RedisKeyAsyncCommandsKeyScanArgs to specify SCAN-specific arguments.scan in interface RedisKeyAsyncCommands<K,V>scan in interface RedisAdvancedClusterAsyncCommands<K,V>scan in class AbstractRedisAsyncCommands<K,V>scanArgs - scan arguments.KeyScanArgspublic RedisFuture<KeyScanCursor<K>> scan(ScanCursor scanCursor, ScanArgs scanArgs)
RedisKeyAsyncCommandsKeyScanArgs to specify SCAN-specific arguments.scan in interface RedisKeyAsyncCommands<K,V>scan in interface RedisAdvancedClusterAsyncCommands<K,V>scan in class AbstractRedisAsyncCommands<K,V>scanCursor - cursor to resume from a previous scan, must not be null.scanArgs - scan arguments.KeyScanArgspublic RedisFuture<KeyScanCursor<K>> scan(ScanCursor scanCursor)
RedisKeyAsyncCommandsscan in interface RedisKeyAsyncCommands<K,V>scan in interface RedisAdvancedClusterAsyncCommands<K,V>scan in class AbstractRedisAsyncCommands<K,V>scanCursor - cursor to resume from a previous scan, must not be null.RedisKeyAsyncCommands.scan(ScanCursor)public RedisFuture<StreamScanCursor> scan(KeyStreamingChannel<K> channel)
RedisKeyAsyncCommandsscan in interface RedisKeyAsyncCommands<K,V>scan in interface RedisAdvancedClusterAsyncCommands<K,V>scan in class AbstractRedisAsyncCommands<K,V>channel - streaming channel that receives a call for every key.RedisKeyAsyncCommands.scan(KeyStreamingChannel)public RedisFuture<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanArgs scanArgs)
RedisKeyAsyncCommandsKeyScanArgs to specify SCAN-specific arguments.scan in interface RedisKeyAsyncCommands<K,V>scan in interface RedisAdvancedClusterAsyncCommands<K,V>scan in class AbstractRedisAsyncCommands<K,V>channel - streaming channel that receives a call for every key.scanArgs - scan arguments.KeyScanArgspublic RedisFuture<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor, ScanArgs scanArgs)
RedisKeyAsyncCommandsKeyScanArgs to specify SCAN-specific arguments.scan in interface RedisKeyAsyncCommands<K,V>scan in interface RedisAdvancedClusterAsyncCommands<K,V>scan in class AbstractRedisAsyncCommands<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 RedisFuture<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor)
RedisKeyAsyncCommandsscan in interface RedisKeyAsyncCommands<K,V>scan in interface RedisAdvancedClusterAsyncCommands<K,V>scan in class AbstractRedisAsyncCommands<K,V>channel - streaming channel that receives a call for every key.scanCursor - cursor to resume from a previous scan, must not be null.RedisKeyAsyncCommands.scan(ScanCursor, ScanArgs)public RedisFuture<AggregationReply<K,V>> ftAggregate(String index, V query, AggregateArgs<K,V> args)
RediSearchAsyncCommands
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 RediSearchAsyncCommands<K,V>ftAggregate in class AbstractRedisAsyncCommands<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,
RediSearchAsyncCommands.ftAggregate(String, Object),
#ftCursorread(String, Cursor)public RedisFuture<AggregationReply<K,V>> ftAggregate(String index, V query)
RediSearchAsyncCommands
This command executes a search query and applies aggregation operations to transform and analyze the results. Unlike
RediSearchAsyncCommands.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 RediSearchAsyncCommands.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 RediSearchAsyncCommands<K,V>ftAggregate in class AbstractRedisAsyncCommands<K,V>index - the index name, as a keyquery - the base filtering query that retrieves documents for aggregationSearchReplySearchReply,
AggregateArgs,
RediSearchAsyncCommands.ftAggregate(String, Object, AggregateArgs)public RedisFuture<SearchReply<K,V>> ftSearch(String index, V query, SearchArgs<K,V> args)
RediSearchAsyncCommands
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 RediSearchAsyncCommands<K,V>ftSearch in class AbstractRedisAsyncCommands<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,
RediSearchAsyncCommands.ftSearch(String, Object)public RedisFuture<SearchReply<K,V>> ftSearch(String index, V query)
RediSearchAsyncCommandsThis 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 RediSearchAsyncCommands<K,V>ftSearch in class AbstractRedisAsyncCommands<K,V>index - the index name, as a keyquery - the query string following RediSearch query syntaxSearchReplySearchReply,
SearchArgs,
RediSearchAsyncCommands.ftSearch(String, Object, SearchArgs)public RedisFuture<String> ftExplain(String index, V query)
RediSearchAsyncCommandsThis 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 RediSearchAsyncCommands<K,V>ftExplain in class AbstractRedisAsyncCommands<K,V>index - the index namequery - the search query to explainRediSearchAsyncCommands.ftExplain(String, Object, ExplainArgs),
RediSearchAsyncCommands.ftSearch(String, Object)public RedisFuture<String> ftExplain(String index, V query, ExplainArgs<K,V> args)
RediSearchAsyncCommandsThis 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 RediSearchAsyncCommands<K,V>ftExplain in class AbstractRedisAsyncCommands<K,V>index - the index namequery - the search query to explainargs - the explain arguments (dialect)RediSearchAsyncCommands.ftExplain(String, Object),
RediSearchAsyncCommands.ftSearch(String, Object)public RedisFuture<List<V>> ftTagvals(String index, String fieldName)
RediSearchAsyncCommandsThis 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 RediSearchAsyncCommands<K,V>ftTagvals in class AbstractRedisAsyncCommands<K,V>index - the index name containing the tag fieldfieldName - the name of the Tag field defined in the index schemaRediSearchAsyncCommands.ftCreate(String, List),
RediSearchAsyncCommands.ftCreate(String, CreateArgs, List)public RedisFuture<SpellCheckResult<V>> ftSpellcheck(String index, V query)
RediSearchAsyncCommandsThis 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 RediSearchAsyncCommands<K,V>ftSpellcheck in class AbstractRedisAsyncCommands<K,V>index - the index with the indexed termsquery - the search query to check for spelling errorsRediSearchAsyncCommands.ftSpellcheck(String, Object, SpellCheckArgs),
RediSearchAsyncCommands.ftDictadd(String, Object[]),
RediSearchAsyncCommands.ftDictdel(String, Object[]),
RediSearchAsyncCommands.ftDictdump(String)public RedisFuture<SpellCheckResult<V>> ftSpellcheck(String index, V query, SpellCheckArgs<K,V> args)
RediSearchAsyncCommandsThis 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 RediSearchAsyncCommands<K,V>ftSpellcheck in class AbstractRedisAsyncCommands<K,V>index - the index with the indexed termsquery - the search query to check for spelling errorsargs - the spellcheck arguments (distance, terms, dialect)RediSearchAsyncCommands.ftSpellcheck(String, Object),
RediSearchAsyncCommands.ftDictadd(String, Object[]),
RediSearchAsyncCommands.ftDictdel(String, Object[]),
RediSearchAsyncCommands.ftDictdump(String)public RedisFuture<Long> ftDictadd(String dict, V... terms)
RediSearchAsyncCommandsThis 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 RediSearchAsyncCommands<K,V>ftDictadd in class AbstractRedisAsyncCommands<K,V>dict - the dictionary nameterms - the terms to add to the dictionaryRediSearchAsyncCommands.ftDictdel(String, Object[]),
RediSearchAsyncCommands.ftDictdump(String)public RedisFuture<Long> ftDictdel(String dict, V... terms)
RediSearchAsyncCommandsThis 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 RediSearchAsyncCommands<K,V>ftDictdel in class AbstractRedisAsyncCommands<K,V>dict - the dictionary nameterms - the terms to delete from the dictionaryRediSearchAsyncCommands.ftDictadd(String, Object[]),
RediSearchAsyncCommands.ftDictdump(String)public RedisFuture<List<V>> ftDictdump(String dict)
RediSearchAsyncCommandsThis 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 RediSearchAsyncCommands<K,V>ftDictdump in class AbstractRedisAsyncCommands<K,V>dict - the dictionary nameRediSearchAsyncCommands.ftDictadd(String, Object[]),
RediSearchAsyncCommands.ftDictdel(String, Object[])public RedisFuture<String> ftAliasadd(String alias, String index)
RediSearchAsyncCommandsThis 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:
RediSearchAsyncCommands.ftAliasupdate(String, String) to reassign an existing aliasTime complexity: O(1)
ftAliasadd in interface RediSearchAsyncCommands<K,V>ftAliasadd in class AbstractRedisAsyncCommands<K,V>alias - the alias name to createindex - the target index name that the alias will point to"OK" if the alias was successfully createdRediSearchAsyncCommands.ftAliasupdate(String, String),
RediSearchAsyncCommands.ftAliasdel(String)public RedisFuture<String> ftAliasupdate(String alias, String index)
RediSearchAsyncCommands
This command updates an existing alias to point to a different index, or creates the alias if it doesn't exist. Unlike
RediSearchAsyncCommands.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 RediSearchAsyncCommands<K,V>ftAliasupdate in class AbstractRedisAsyncCommands<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 updatedRediSearchAsyncCommands.ftAliasadd(String, String),
RediSearchAsyncCommands.ftAliasdel(String)public RedisFuture<String> ftAliasdel(String alias)
RediSearchAsyncCommandsThis 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:
RediSearchAsyncCommands.ftAliasupdate(String, String) to redirect before deletionTime complexity: O(1)
ftAliasdel in interface RediSearchAsyncCommands<K,V>ftAliasdel in class AbstractRedisAsyncCommands<K,V>alias - the alias name to remove"OK" if the alias was successfully removedRediSearchAsyncCommands.ftAliasadd(String, String),
RediSearchAsyncCommands.ftAliasupdate(String, String)public RedisFuture<List<V>> ftList()
RediSearchAsyncCommandsThis 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 RediSearchAsyncCommands<K,V>ftList in class AbstractRedisAsyncCommands<K,V>#ftCreate(String, CreateArgs, FieldArgs[]),
RediSearchAsyncCommands.ftDropindex(String)public RedisFuture<String> ftCreate(String index, List<FieldArgs<K>> fieldArgs)
RediSearchAsyncCommandsThis 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 RediSearchAsyncCommands<K,V>ftCreate in class AbstractRedisAsyncCommands<K,V>index - the index namefieldArgs - the FieldArgs list defining the searchable fields and their types"OK" if the index was created successfullyCreateArgs,
FieldArgs,
RediSearchAsyncCommands.ftCreate(String, CreateArgs, List),
RediSearchAsyncCommands.ftDropindex(String)public RedisFuture<String> ftCreate(String index, CreateArgs<K,V> arguments, List<FieldArgs<K>> fieldArgs)
RediSearchAsyncCommandsThis 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 RediSearchAsyncCommands<K,V>ftCreate in class AbstractRedisAsyncCommands<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,
RediSearchAsyncCommands.ftCreate(String, List),
RediSearchAsyncCommands.ftDropindex(String)public RedisFuture<String> ftAlter(String index, boolean skipInitialScan, List<FieldArgs<K>> fieldArgs)
RediSearchAsyncCommandsThis 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 RediSearchAsyncCommands<K,V>ftAlter in class AbstractRedisAsyncCommands<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,
RediSearchAsyncCommands.ftCreate(String, List),
RediSearchAsyncCommands.ftCreate(String, CreateArgs, List)public RedisFuture<String> ftAlter(String index, List<FieldArgs<K>> fieldArgs)
RediSearchAsyncCommandsThis 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 RediSearchAsyncCommands<K,V>ftAlter in class AbstractRedisAsyncCommands<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,
RediSearchAsyncCommands.ftCreate(String, List),
RediSearchAsyncCommands.ftCreate(String, CreateArgs, List)public RedisFuture<String> ftDropindex(String index, boolean deleteDocumentKeys)
RediSearchAsyncCommands
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 (RediSearchAsyncCommands.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 RediSearchAsyncCommands<K,V>ftDropindex in class AbstractRedisAsyncCommands<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 droppedRediSearchAsyncCommands.ftDropindex(String),
RediSearchAsyncCommands.ftCreate(String, List)public RedisFuture<String> ftDropindex(String index)
RediSearchAsyncCommandsThis 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 RediSearchAsyncCommands<K,V>ftDropindex in class AbstractRedisAsyncCommands<K,V>index - the index name, as a key"OK" if the index was successfully droppedRediSearchAsyncCommands.ftDropindex(String, boolean),
RediSearchAsyncCommands.ftCreate(String, List)public RedisFuture<Map<V,List<V>>> ftSyndump(String index)
RediSearchAsyncCommandsThis 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 RediSearchAsyncCommands<K,V>ftSyndump in class AbstractRedisAsyncCommands<K,V>index - the index nameRediSearchAsyncCommands.ftSynupdate(String, Object, Object[]),
RediSearchAsyncCommands.ftSynupdate(String, Object, SynUpdateArgs, Object[])public RedisFuture<String> ftSynupdate(String index, V synonymGroupId, V... terms)
RediSearchAsyncCommandsThis 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 RediSearchAsyncCommands<K,V>ftSynupdate in class AbstractRedisAsyncCommands<K,V>index - the index namesynonymGroupId - the synonym group identifierterms - the terms to add to the synonym groupRediSearchAsyncCommands.ftSynupdate(String, Object, SynUpdateArgs, Object[]),
RediSearchAsyncCommands.ftSyndump(String)public RedisFuture<String> ftSynupdate(String index, V synonymGroupId, SynUpdateArgs<K,V> args, V... terms)
RediSearchAsyncCommandsThis 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 RediSearchAsyncCommands<K,V>ftSynupdate in class AbstractRedisAsyncCommands<K,V>index - the index namesynonymGroupId - the synonym group identifierargs - the synupdate arguments (skipInitialScan)terms - the terms to add to the synonym groupRediSearchAsyncCommands.ftSynupdate(String, Object, Object[]),
RediSearchAsyncCommands.ftSyndump(String)public RedisFuture<AggregationReply<K,V>> ftCursorread(String index, AggregationReply.Cursor cursor, int count)
RediSearchAsyncCommands
This command is used to read the next batch of results from a cursor that was created by
RediSearchAsyncCommands.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 RediSearchAsyncCommands<K,V>ftCursorread in class AbstractRedisAsyncCommands<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.AGGREGATEAggregationReplyAggregationReply,
RediSearchAsyncCommands.ftAggregate(String, Object, AggregateArgs)public RedisFuture<AggregationReply<K,V>> ftCursorread(String index, AggregationReply.Cursor cursor)
RediSearchAsyncCommands
This command is used to read the next batch of results from a cursor created by
RediSearchAsyncCommands.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 RediSearchAsyncCommands<K,V>ftCursorread in class AbstractRedisAsyncCommands<K,V>index - the index namecursor - the cursor obtained from a previous FT.AGGREGATE or FT.CURSOR READ commandAggregationReplyAggregationReply,
RediSearchAsyncCommands.ftAggregate(String, Object, AggregateArgs)public RedisFuture<String> ftCursordel(String index, AggregationReply.Cursor cursor)
RediSearchAsyncCommands
This command is used to explicitly delete a cursor created by RediSearchAsyncCommands.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 RediSearchAsyncCommands<K,V>ftCursordel in class AbstractRedisAsyncCommands<K,V>index - the index name, as a keycursor - the cursor obtained from a previous FT.AGGREGATE or FT.CURSOR READ command"OK" if the cursor was successfully deletedRediSearchAsyncCommands.ftAggregate(String, Object, AggregateArgs),
#ftCursorread(String, Cursor),
#ftCursorread(String, Cursor, int)protected <T> Map<String,CompletableFuture<T>> executeOnUpstream(Function<RedisClusterAsyncCommands<K,V>,RedisFuture<T>> function)
T - result typefunction - function producing the commandprotected <T> Map<String,CompletableFuture<T>> executeOnNodes(Function<RedisClusterAsyncCommands<K,V>,RedisFuture<T>> function, Function<RedisClusterNode,Boolean> filter)
filter.T - result typefunction - function producing the commandfilter - filter function for the node selectionCopyright © 2025 lettuce.io. All rights reserved.