Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RedisModules

Hierarchy

  • Module
  • RedisAIMixin
  • RedisBloomCMKMixin
  • RedisBloomCuckooMixin
  • RedisBloomTopKMixin
  • RedisBloomMixin
  • RedisBloomTDigestMixin
  • RedisearchMixin
  • RedisGearsMixin
  • RedisGraphMixin
  • ReJSONMixin
  • RedisIntervalSetMixin
  • RedisTimeSeriesMixin
    • RedisModules

Index

Constructors

Properties

Methods

Constructors

  • new RedisModules(clusterNodes: ClusterNode[], moduleOptions?: RedisModuleOptions, clusterOptions?: ClusterOptions): RedisModules
  • new RedisModules(redisOptions: RedisOptions, moduleOptions?: RedisModuleOptions): RedisModules
  • Initializing the module object

    Parameters

    • clusterNodes: ClusterNode[]

      The nodes of the cluster

    • Optional moduleOptions: RedisModuleOptions

      The additional module options

    • Optional clusterOptions: ClusterOptions

      The options of the clusters

    Returns RedisModules

  • Initializing the module object

    Parameters

    • redisOptions: RedisOptions

      The options of the redis database

    • Optional moduleOptions: RedisModuleOptions

      The additional module options

    Returns RedisModules

Properties

aiCommander: RedisAICommander = ...
ai_module_config: (path: string, backend?: AIBackend) => Promise<"OK">

Type declaration

    • (path: string, backend?: AIBackend): Promise<"OK">
    • Restrieving configuration

      Parameters

      • path: string

        Specifies the default base backends path to path . The backends path is used when dynamically loading a backend (default: '{module_path}/backends', where module_path is the module's path).

      • Optional backend: AIBackend

        Loads the DL/ML backend specified by the backend identifier from path . If path is relative, it is resolved by prefixing the BACKENDSPATH to it. If path is absolute then it is used as is.

      Returns Promise<"OK">

ai_module_dagexecute: (parameters: AIDagExecuteParameters, commands: string[]) => Promise<string[]>

Type declaration

    • Running a DAG

      Parameters

      • parameters: AIDagExecuteParameters

        Additional parameters required for the 'AI.DAGEXECUTE' command

      • commands: string[]

        The commands sent to the 'AI.DAGEXECUTE' command

      Returns Promise<string[]>

ai_module_dagexecuteRO: (parameters: AIDagExecuteParameters, commands: string[]) => Promise<string[]>

Type declaration

    • Running a readonly DAG

      Parameters

      • parameters: AIDagExecuteParameters

        Additional parameters required for the 'AI.DAGEXECUTE_RO' command

      • commands: string[]

        The commands sent to the 'AI.DAGEXECUTE_RO' command

      Returns Promise<string[]>

ai_module_info: (key: string, RESETSTAT?: boolean) => Promise<string | string[] | AIScriptInfo>

Type declaration

    • (key: string, RESETSTAT?: boolean): Promise<string | string[] | AIScriptInfo>
    • Retrieving script/model info

      Parameters

      • key: string

        The key name of a model or script

      • Optional RESETSTAT: boolean

        Resets all statistics associated with the key

      Returns Promise<string | string[] | AIScriptInfo>

ai_module_modeldel: (key: string) => Promise<"OK">

Type declaration

    • (key: string): Promise<"OK">
    • Deleting a model

      Parameters

      • key: string

        The model's key name

      Returns Promise<"OK">

ai_module_modelexecute: (key: string, parameters: AIModelExecute) => Promise<"OK">

Type declaration

    • Running a model

      Parameters

      • key: string

        The model's key name

      • parameters: AIModelExecute

        The parameters of 'AI.MODELEXECUTE'

      Returns Promise<"OK">

ai_module_modelget: (key: string, meta?: boolean, blob?: boolean) => Promise<string | string[] | AIModel>

Type declaration

    • (key: string, meta?: boolean, blob?: boolean): Promise<string | string[] | AIModel>
    • Retrieving a model

      Parameters

      • key: string

        The model's key name

      • Optional meta: boolean

        Will return the model's meta information on backend, device and tag

      • Optional blob: boolean

        Will return the model's blob containing the serialized model

      Returns Promise<string | string[] | AIModel>

ai_module_modelscan: () => Promise<string[][]>

Type declaration

    • (): Promise<string[][]>
    • Scanning a model

      Returns Promise<string[][]>

ai_module_modelstore: (key: string, backend: AIBackend, device: string, model: Buffer, options?: AIModelSetParameters) => Promise<"OK">

Type declaration

    • Setting a model

      Parameters

      • key: string

        The model's key name

      • backend: AIBackend

        The backend of the model

      • device: string

        The devide of the model

      • model: Buffer

        The Protobuf-serialized model. Since Redis supports strings up to 512MB, blobs for very large

      • Optional options: AIModelSetParameters

        Additional optional parameters

      Returns Promise<"OK">

ai_module_scriptdel: (key: string) => Promise<"OK">

Type declaration

    • (key: string): Promise<"OK">
    • Deleting a script

      Parameters

      • key: string

        The script's key name

      Returns Promise<"OK">

ai_module_scriptexecute: (key: string, functionName: string, parameters: AIScriptExecuteParameters) => Promise<"OK">

Type declaration

    • Running a script

      Parameters

      • key: string

        The script's key nameb

      • functionName: string

        The name of the function to run

      • parameters: AIScriptExecuteParameters

        The parameters of the 'AI.SCRIPTEXECUTE' command

      Returns Promise<"OK">

ai_module_scriptget: (key: string, meta?: boolean, source?: boolean) => Promise<string | string[] | AIScript>

Type declaration

    • (key: string, meta?: boolean, source?: boolean): Promise<string | string[] | AIScript>
    • Retrieving a script

      Parameters

      • key: string

        The script's key name

      • Optional meta: boolean

        The script's device as a String

      • Optional source: boolean

        The script's source code as a String

      Returns Promise<string | string[] | AIScript>

ai_module_scriptscan: () => Promise<string[][]>

Type declaration

    • (): Promise<string[][]>
    • Scanning a script

      Returns Promise<string[][]>

ai_module_scriptset: (key: string, parameters: AIScriptSetParameters) => Promise<"OK">

Type declaration

    • Setting a script

      Parameters

      Returns Promise<"OK">

ai_module_tensorget: (key: string, format?: "BLOB" | "VALUES", meta?: boolean) => Promise<string | AITensorInfo | string[]>

Type declaration

    • (key: string, format?: "BLOB" | "VALUES", meta?: boolean): Promise<string | AITensorInfo | string[]>
    • Retrieving a tensor

      Parameters

      • key: string

        The tensor's key name

      • Optional format: "BLOB" | "VALUES"

        The tensor's reply format can be one of the following (BLOB/VALUES)

      • Optional meta: boolean

        Returns the tensor's metadata

      Returns Promise<string | AITensorInfo | string[]>

ai_module_tensorset: (key: string, type: TensorType, shapes: number[], data?: number[] | Buffer[]) => Promise<"OK">

Type declaration

    • (key: string, type: TensorType, shapes: number[], data?: number[] | Buffer[]): Promise<"OK">
    • Setting a tensor

      Parameters

      • key: string

        The tensor's key name

      • type: TensorType

        The tensor's data type can be one of: FLOAT , DOUBLE , INT8 , INT16 , INT32 , INT64 , UINT8 or UINT16

      • shapes: number[]
      • Optional data: number[] | Buffer[]

        The tensor's data (binary/numberic)

      Returns Promise<"OK">

bloomCmkCommander: BloomCmkCommander = ...
bloomCommander: BloomCommander = ...
bloomCuckooCommander: BloomCuckooCommander = ...
bloomTdigestCommander: BloomTdigestCommander = ...
bloomTopkCommander: BloomTopkCommander = ...
bloom_cmk_module_incrby: (key: string, items: CMKIncrbyItems[]) => Promise<number[]>

Type declaration

    • Increases the count of item's by increment.

      Parameters

      • key: string

        The name of the sketch.

      • items: CMKIncrbyItems[]

        A list of item and increment set's

      Returns Promise<number[]>

bloom_cmk_module_info: (key: string) => Promise<string[]>

Type declaration

    • (key: string): Promise<string[]>
    • Returning information about a key

      Parameters

      • key: string

        The key of the 'CMS.INFO' command

      Returns Promise<string[]>

bloom_cmk_module_initbydim: (key: string, width: number, depth: number) => Promise<"OK">

Type declaration

    • (key: string, width: number, depth: number): Promise<"OK">
    • Initializes a Count-Min Sketch to dimensions specified by user.

      Parameters

      • key: string

        The name of the sketch.

      • width: number

        The number of counter in each array. Reduces the error size.

      • depth: number

        The number of counter-arrays. Reduces the probability for an error of a certain size (percentage of total count).

      Returns Promise<"OK">

bloom_cmk_module_initbyprob: (key: string, errorSize: number, probability: number) => Promise<"OK">

Type declaration

    • (key: string, errorSize: number, probability: number): Promise<"OK">
    • Initializes a Count-Min Sketch to accommodate requested capacity.

      Parameters

      • key: string

        The name of the sketch.

      • errorSize: number

        Estimate size of error. The error is a percent of total counted items. This effects the width of the sketch.

      • probability: number

        The desired probability for inflated count.

      Returns Promise<"OK">

bloom_cmk_module_merge: (dest: string, numKeys: number, sources: string[], weights?: number[]) => Promise<"OK">

Type declaration

    • (dest: string, numKeys: number, sources: string[], weights?: number[]): Promise<"OK">
    • Merges several sketches into one sketch.

      Parameters

      • dest: string

        The name of destination sketch.

      • numKeys: number

        The number of sketches to be merged.

      • sources: string[]

        The names of source sketches to be merged.

      • Optional weights: number[]

        A multiple of each sketch. Default =1.

      Returns Promise<"OK">

bloom_cmk_module_query: (key: string, items: string[]) => Promise<number[]>

Type declaration

    • (key: string, items: string[]): Promise<number[]>
    • Returns count for item's.

      Parameters

      • key: string

        The name of the sketch.

      • items: string[]

        A list of items.

      Returns Promise<number[]>

bloom_cuckoo_module_add: (key: string, item: string) => Promise<CFResponse>

Type declaration

    • Adding an item to the cuckoo filter, creating the filter if it does not exist.

      Parameters

      • key: string

        The name of the filter

      • item: string

        The item to add

      Returns Promise<CFResponse>

bloom_cuckoo_module_addnx: (key: string, item: string) => Promise<CFResponse>

Type declaration

    • Adding an item to a cuckoo filter if the item did not exist previously.

      Parameters

      • key: string

        The name of the filter

      • item: string

        The item to add

      Returns Promise<CFResponse>

bloom_cuckoo_module_count: (key: string, item: string) => Promise<number>

Type declaration

    • (key: string, item: string): Promise<number>
    • Returning the number of times an item may be in the filter.

      Parameters

      • key: string

        The name of the filter

      • item: string

        The item to count

      Returns Promise<number>

bloom_cuckoo_module_del: (key: string, item: string) => Promise<CFResponse>

Type declaration

    • Deleting an item once from the filter. If the item exists only once, it will be removed from the filter.

      Parameters

      • key: string

        The name of the filter

      • item: string

        The item to delete from the filter

      Returns Promise<CFResponse>

bloom_cuckoo_module_exists: (key: string, item: string) => Promise<CFResponse>

Type declaration

    • Determining whether an item may exist in the Cuckoo Filter or not.

      Parameters

      • key: string

        The name of the filter

      • item: string

        The item to check for

      Returns Promise<CFResponse>

bloom_cuckoo_module_info: (key: string) => Promise<string[]>

Type declaration

    • (key: string): Promise<string[]>
    • Returning information about a key

      Parameters

      • key: string

        The name of the filter

      Returns Promise<string[]>

bloom_cuckoo_module_insert: (key: string, items: string[], options?: CFInsertParameters) => Promise<CFResponse[]>

Type declaration

    • Adding one or more items to a cuckoo filter, allowing the filter to be created with a custom capacity if it does not yet exist.

      Parameters

      • key: string

        The name of the filter

      • items: string[]

        Begin the list of items to add

      • Optional options: CFInsertParameters

        The additional optional parameters of the 'CF.INSERT' command

      Returns Promise<CFResponse[]>

bloom_cuckoo_module_insertnx: (key: string, items: string[], options?: CFInsertParameters) => Promise<CFResponse[]>

Type declaration

    • Adding one or more items to a cuckoo filter, allowing the filter to be created with a custom capacity if it does not yet exist.

      Parameters

      • key: string

        The name of the filter

      • items: string[]

        The items of the 'CF.INSERT' command

      • Optional options: CFInsertParameters

        The additional optional parameters of the 'CF.INSERTNX' command

      Returns Promise<CFResponse[]>

bloom_cuckoo_module_loadchunk: (key: string, iterator: number, data: string) => Promise<"OK">

Type declaration

    • (key: string, iterator: number, data: string): Promise<"OK">
    • Restoring a filter previously saved using SCANDUMP.

      Parameters

      • key: string

        The name of the key to restore

      • iterator: number

        The iterator value associated with data (returned by SCANDUMP )

      • data: string

        The current data chunk (returned by SCANDUMP )

      Returns Promise<"OK">

bloom_cuckoo_module_reserve: (key: string, capacity: number, options?: CFReserveParameters) => Promise<"OK">

Type declaration

    • Creating an empty Bloom Cuckoo filter with a given initial capacity.

      Parameters

      • key: string

        The key under which the filter is to be found

      • capacity: number

        The number of entries you intend to add to the filter. Performance will begin to degrade after adding more items than this number. The actual degradation will depend on how far the limit has been exceeded. Performance will degrade linearly as the number of entries grow exponentially.

      • Optional options: CFReserveParameters

        The additional optional parameters

      Returns Promise<"OK">

bloom_cuckoo_module_scandump: (key: string, iterator: number) => Promise<string[]>

Type declaration

    • (key: string, iterator: number): Promise<string[]>
    • Begining an incremental save of the Cuckoo filter

      Parameters

      • key: string

        The name of the filter

      • iterator: number

        Iterator value. This is either 0, or the iterator from a previous invocation of this command

      Returns Promise<string[]>

bloom_module_add: (key: string, item: string) => Promise<BFResponse>

Type declaration

    • Adding an item to the Bloom Filter, creating the filter if it does not yet exist.

      Parameters

      • key: string

        The key of the 'BF.ADD' command

      • item: string

        The item of the 'BF.ADD' command

      Returns Promise<BFResponse>

bloom_module_exists: (key: string, item: string) => Promise<BFResponse>

Type declaration

    • Determining whether an item may exist in the Bloom Filter or not.

      Parameters

      • key: string

        The key of the 'BF.EXISTS' command

      • item: string

        The key of the 'BF.EXISTS' command

      Returns Promise<BFResponse>

bloom_module_info: (key: string) => Promise<string[]>

Type declaration

    • (key: string): Promise<string[]>
    • Returning information about a key

      Parameters

      • key: string

        The key of the 'BF.INFO' command

      Returns Promise<string[]>

bloom_module_insert: (key: string, items: string[], options?: BFInsertParameters) => Promise<BFResponse[]>

Type declaration

    • Adding one or more items to the bloom filter, by default creating it if it does not yet exist. There are several arguments which may be used to modify this behavior.

      Parameters

      • key: string

        The key of the 'BF.INSERT' command

      • items: string[]

        The items of the 'BF.INSERT' command

      • Optional options: BFInsertParameters

        The additional optional parameters of the 'BF.INSERT' command

      Returns Promise<BFResponse[]>

bloom_module_loadchunk: (key: string, iterator: number, data: string) => Promise<"OK">

Type declaration

    • (key: string, iterator: number, data: string): Promise<"OK">
    • Restoring a filter previously saved using SCANDUMP.

      Parameters

      • key: string

        The key of the 'BF.LOADCHUNK' command

      • iterator: number

        The iterator of the 'BF.LOADCHUNK' command

      • data: string

        The data of the 'BF.LOADCHUNK' command

      Returns Promise<"OK">

bloom_module_madd: (key: string, items: string[]) => Promise<BFResponse[]>

Type declaration

    • (key: string, items: string[]): Promise<BFResponse[]>
    • Adding one or more items to the Bloom Filter, creating the filter if it does not yet exist. This command operates identically to BF.ADD except it allows multiple inputs and returns multiple values * @param key

      Parameters

      • key: string
      • items: string[]

        The items of the 'BF.MADD' command

      Returns Promise<BFResponse[]>

bloom_module_mexists: (key: string, items: string[]) => Promise<BFResponse[]>

Type declaration

    • (key: string, items: string[]): Promise<BFResponse[]>
    • Determining if one or more items may exist in the filter or not.

      Parameters

      • key: string

        The key of the 'BF.MEXISTS' command

      • items: string[]

        The items of the 'BF.MEXISTS' command

      Returns Promise<BFResponse[]>

bloom_module_reserve: (key: string, errorRate: number, capacity: number, options?: BFReserveParameter) => Promise<"OK">

Type declaration

    • (key: string, errorRate: number, capacity: number, options?: BFReserveParameter): Promise<"OK">
    • Creating an empty Bloom filter with a given desired error ratio and initial capacity.

      Parameters

      • key: string

        The key under which the filter is to be found

      • errorRate: number

        The desired probability for false positives. This should be a decimal value between 0 and 1. For example, for a desired false positive rate of 0.1% (1 in 1000), error_rate should be set to 0.001. The closer this number is to zero, the greater the memory consumption per item and the more CPU usage per operation.

      • capacity: number

        The number of entries you intend to add to the filter. Performance will begin to degrade after adding more items than this number. The actual degradation will depend on how far the limit has been exceeded. Performance will degrade linearly as the number of entries grow exponentially.

      • Optional options: BFReserveParameter

        The additional optional parameters

      Returns Promise<"OK">

bloom_module_scandump: (key: string, iterator: number) => Promise<string[]>

Type declaration

    • (key: string, iterator: number): Promise<string[]>
    • Begining an incremental save of the bloom filter

      Parameters

      • key: string

        The key of the 'BF.SCANDUMP' command

      • iterator: number

        The iterator of the 'BF.SCANDUMP' command

      Returns Promise<string[]>

bloom_tdigest_module_add: (key: string, parameters: TDigestAddParameters[]) => Promise<"OK">

Type declaration

    • (key: string, parameters: TDigestAddParameters[]): Promise<"OK">
    • Adds one or more samples to a sketch

      Parameters

      • key: string

        The name of the sketch

      • parameters: TDigestAddParameters[]

        The parameters of the command

      Returns Promise<"OK">

      OK on success, error otherwise

bloom_tdigest_module_cdf: (key: string, value: number) => Promise<number>

Type declaration

    • (key: string, value: number): Promise<number>
    • Returns the fraction of all points added which are <= value

      Parameters

      • key: string

        The name of the sketch

      • value: number

        Upper limit for which the fraction of all points added which are <= value

      Returns Promise<number>

      Returns compression, capacity, total merged and unmerged nodes, the total compressions made up to date on that key, and merged and unmerged weight

bloom_tdigest_module_create: (key: string, compression?: number) => Promise<"OK">

Type declaration

    • (key: string, compression?: number): Promise<"OK">
    • Allocate the memory and initialize the t-digest

      Parameters

      • key: string

        The name of the sketch

      • Optional compression: number

        The compression parameter. 100 is a common value for normal uses. 1000 is extremely large. If no value is passed by default the compression will be 100.

      Returns Promise<"OK">

      OK on success, error otherwise

bloom_tdigest_module_info: (key: string) => Promise<TDigestInfo>

Type declaration

    • (key: string): Promise<TDigestInfo>
    • Returns compression, capacity, total merged and unmerged nodes, the total compressions made up to date on that key, and merged and unmerged weight.

      Parameters

      • key: string

        The name of the sketch

      Returns Promise<TDigestInfo>

bloom_tdigest_module_max: (key: string) => Promise<number>

Type declaration

    • (key: string): Promise<number>
    • Get maximum value from the sketch. Will return DBL_MIN if the sketch is empty

      Parameters

      • key: string

        The name of the sketch

      Returns Promise<number>

      DBL_MIN if the sketch is empty

bloom_tdigest_module_merge: (destinationKey: string, sourceKeys: string | string[], options?: TDigestMergeOptions) => Promise<"OK">

Type declaration

    • (destinationKey: string, sourceKeys: string | string[], options?: TDigestMergeOptions): Promise<"OK">
    • Merges all of the values from 'from' keys to 'destination-key' sketch.

      Parameters

      • destinationKey: string

        Sketch to copy values to.

      • sourceKeys: string | string[]

        Sketch to copy values from, this can be a string for 1 key or an array of keys.

      • Optional options: TDigestMergeOptions

      Returns Promise<"OK">

bloom_tdigest_module_min: (key: string) => Promise<number>

Type declaration

    • (key: string): Promise<number>
    • Get minimum value from the sketch. Will return DBL_MAX if the sketch is empty

      Parameters

      • key: string

        The name of the sketch

      Returns Promise<number>

      DBL_MAX if the sketch is empty

bloom_tdigest_module_quantile: (key: string, quantile: number) => Promise<number>

Type declaration

    • (key: string, quantile: number): Promise<number>
    • Returns an estimate of the cutoff such that a specified fraction of the data added to this TDigest would be less than or equal to the cutoff

      Parameters

      • key: string

        The name of the sketch

      • quantile: number

        The desired fraction ( between 0 and 1 inclusively )

      Returns Promise<number>

      Double value estimate of the cutoff such that a specified fraction of the data added to this TDigest would be less than or equal to the cutoff

bloom_tdigest_module_reset: (key: string) => Promise<"OK">

Type declaration

    • (key: string): Promise<"OK">
    • Reset the sketch to zero - empty out the sketch and re-initialize it

      Parameters

      • key: string

        The name of the sketch

      Returns Promise<"OK">

      OK on success, error otherwise

bloom_topk_module_add: (key: string, items: (string | number)[]) => Promise<string[]>

Type declaration

    • (key: string, items: (string | number)[]): Promise<string[]>
    • Adding an item to the data structure.

      Parameters

      • key: string

        Name of sketch where item is added.

      • items: (string | number)[]

        Item/s to be added.

      Returns Promise<string[]>

bloom_topk_module_count: (key: string, items: (string | number)[]) => Promise<number[]>

Type declaration

    • (key: string, items: (string | number)[]): Promise<number[]>
    • Returning count for an item.

      Parameters

      • key: string

        Name of sketch where item is counted.

      • items: (string | number)[]

        Item/s to be counted.

      Returns Promise<number[]>

bloom_topk_module_incrby: (key: string, items: TOPKIncrbyItems[]) => Promise<string[]>

Type declaration

    • Increases the count of item's by increment.

      Parameters

      • key: string

        The name of the sketch.

      • items: TOPKIncrbyItems[]

        A list of item and increment set's

      Returns Promise<string[]>

bloom_topk_module_info: (key: string) => Promise<(string | number)[]>

Type declaration

    • (key: string): Promise<(string | number)[]>
    • Returning information about a key

      Parameters

      • key: string

        Name of sketch.

      Returns Promise<(string | number)[]>

bloom_topk_module_list: (key: string) => Promise<(string | number)[]>

Type declaration

    • (key: string): Promise<(string | number)[]>
    • Returning full list of items in Top K list.

      Parameters

      • key: string

        Name of sketch where item is counted.

      Returns Promise<(string | number)[]>

bloom_topk_module_query: (key: string, items: (string | number)[]) => Promise<TOPKResponse[]>

Type declaration

    • (key: string, items: (string | number)[]): Promise<TOPKResponse[]>
    • Checking whether an item is one of Top-K items.

      Parameters

      • key: string

        Name of sketch where item is queried.

      • items: (string | number)[]

        Item/s to be queried.

      Returns Promise<TOPKResponse[]>

bloom_topk_module_reserve: (key: string, topk: number, width: number, depth: number, decay: number) => Promise<"OK">

Type declaration

    • (key: string, topk: number, width: number, depth: number, decay: number): Promise<"OK">
    • Initializing a TopK with specified parameters

      Parameters

      • key: string

        The key under which the sketch is to be found.

      • topk: number

        The number of top occurring items to keep.

      • width: number

        The number of counters kept in each array.

      • depth: number

        The number of arrays.

      • decay: number

        The probability of reducing a counter in an occupied bucket. It is raised to power of it's counter (decay ^ bucket[i].counter). Therefore, as the counter gets higher, the chance of a reduction is being reduced.

      Returns Promise<"OK">

cluster: Cluster
clusterNodes: ClusterNode[]
clusterOptions: ClusterOptions
gearsCommander: GearsCommander = ...
gears_module_abortExecution: (id: string) => Promise<"OK">

Type declaration

    • (id: string): Promise<"OK">
    • Aborting an existing execution

      Parameters

      • id: string

        The id of the execution

      Returns Promise<"OK">

gears_module_configGet: (key: string[]) => Promise<number>

Type declaration

    • (key: string[]): Promise<number>
    • Retrieving key's configuration

      Parameters

      • key: string[]

        A list of keys

      Returns Promise<number>

gears_module_configSet: (keyvalues: string[][]) => Promise<"OK"[]>

Type declaration

    • (keyvalues: string[][]): Promise<"OK"[]>
    • Setting key's configuration

      Parameters

      • keyvalues: string[][]

      Returns Promise<"OK"[]>

gears_module_dropExecution: (id: string) => Promise<"OK">

Type declaration

    • (id: string): Promise<"OK">
    • Dropping an existing execution

      Parameters

      • id: string

        The id of the execution

      Returns Promise<"OK">

gears_module_dumpExecutions: () => Promise<string[][]>

Type declaration

    • (): Promise<string[][]>
    • Dumping all of the executions

      Returns Promise<string[][]>

gears_module_dumpRegistrations: () => Promise<string[][]>

Type declaration

    • (): Promise<string[][]>
    • Dumping all of the registrations

      Returns Promise<string[][]>

gears_module_getExecution: (id: string, options?: RGGetExecutionParameters) => Promise<string[][]>

Type declaration

    • Retrieving an execution

      Parameters

      Returns Promise<string[][]>

gears_module_getResults: (id: string) => Promise<string>

Type declaration

    • (id: string): Promise<string>
    • Retrieving the results

      Parameters

      • id: string

        The id of the execution

      Returns Promise<string>

gears_module_getResultsBlocking: (id: string) => Promise<string>

Type declaration

    • (id: string): Promise<string>
    • Retrieving the results that have 'UNBLOCKING' argument (And removing it)

      Parameters

      • id: string

        The id of the execution

      Returns Promise<string>

gears_module_infocluster: () => Promise<string[]>

Type declaration

    • (): Promise<string[]>
    • Retrieving information about the cluster

      Returns Promise<string[]>

gears_module_pydumpreqs: () => Promise<string[]>

Type declaration

    • (): Promise<string[]>
    • Retrieving a list of all the python requirements available

      Returns Promise<string[]>

gears_module_pyexecute: (func: string, options?: RGPyExecuteParameters) => Promise<string>

Type declaration

    • Executing a python function

      Parameters

      Returns Promise<string>

gears_module_pystats: () => Promise<string[]>

Type declaration

    • (): Promise<string[]>
    • Retrieving memory usage statistics from the 'Python interpreter'

      Returns Promise<string[]>

gears_module_refreshCluster: () => Promise<"OK">

Type declaration

    • (): Promise<"OK">
    • Refreshing the node's view of the cluster's topology

      Returns Promise<"OK">

gears_module_trigger: (trigger: string, args: string[]) => Promise<string[]>

Type declaration

    • (trigger: string, args: string[]): Promise<string[]>
    • Triggering the execution of a registered 'CommandReader' function

      Parameters

      • trigger: string

        The trigger's name

      • args: string[]

        The additional arguments

      Returns Promise<string[]>

gears_module_unregister: (id: string) => Promise<"OK">

Type declaration

    • (id: string): Promise<"OK">
    • Removing the registration of a function

      Parameters

      • id: string

        The id of the execution

      Returns Promise<"OK">

graphCommander: GraphCommander = ...
graph_module_config: (commandType: "GET" | "SET" | "HELP", option: string, value?: string) => Promise<string | number | GraphConfigInfo>

Type declaration

    • (commandType: "GET" | "SET" | "HELP", option: string, value?: string): Promise<string | number | GraphConfigInfo>
    • Retrieves, describes and sets runtime configuration options

      Parameters

      • commandType: "GET" | "SET" | "HELP"
      • option: string

        The option

      • Optional value: string

        In case of 'SET' command, a valid value to set

      Returns Promise<string | number | GraphConfigInfo>

      If 'SET' command, returns 'OK' for valid runtime-settable option names and values. If 'GET' command, returns a string with the current option's value.

graph_module_delete: (name: string) => Promise<string>

Type declaration

    • (name: string): Promise<string>
    • Completely removing the graph and all of its entities

      Parameters

      • name: string

        The name of the graph

      Returns Promise<string>

      String indicating if operation succeeded or failed.

graph_module_explain: (name: string, query: string) => Promise<string[]>

Type declaration

    • (name: string, query: string): Promise<string[]>
    • Constructing a query execution plan but does not run it. Inspect this execution plan to better understand how your query will get executed

      Parameters

      • name: string

        The name of the graph

      • query: string

        The query to execute

      Returns Promise<string[]>

      String representation of a query execution plan

graph_module_profile: (name: string, query: string) => Promise<string[]>

Type declaration

    • (name: string, query: string): Promise<string[]>
    • Executing a query and produces an execution plan augmented with metrics for each operation's execution

      Parameters

      • name: string

        The name of the graph

      • query: string

        The query to execute

      Returns Promise<string[]>

      String representation of a query execution plan, with details on results produced by and time spent in each operation.

graph_module_query: (name: string, query: string, params?: {}) => Promise<string[][]>

Type declaration

    • (name: string, query: string, params?: {}): Promise<string[][]>
    • Executing the given query against a specific graph

      Parameters

      • name: string

        The name of the graph

      • query: string

        The query to execute

      • Optional params: {}

        The params of the query

        • [key: string]: string

      Returns Promise<string[][]>

      Result set

graph_module_readonlyQuery: (name: string, query: string, params?: {}) => Promise<string[][]>

Type declaration

    • (name: string, query: string, params?: {}): Promise<string[][]>
    • Executing the given readonly query against a specific graph

      Parameters

      • name: string

        The name of the graph

      • query: string

        The query to execute

      • Optional params: {}

        The params of the query

        • [key: string]: string

      Returns Promise<string[][]>

      Result set

graph_module_slowlog: (id: number) => Promise<string[]>

Type declaration

    • (id: number): Promise<string[]>
    • Retrieving a list containing up to 10 of the slowest queries

      Parameters

      • id: number

        The id of the graph

      Returns Promise<string[]>

      A list containing up to 10 of the slowest queries issued against the given graph ID.

isHandleError: boolean
name: string
redis: Redis
redisOptions: RedisOptions
redisaiCommander: RedisAICommander
rejsonCommander: RejsonCommander = ...
rejson_module_arrappend: (key: string, items: string[], path?: string) => Promise<number>

Type declaration

    • (key: string, items: string[], path?: string): Promise<number>
    • Appending string to JSON key array value

      Parameters

      • key: string

        The name of the key

      • items: string[]

        The items to append to an existing JSON array

      • Optional path: string

        The path of the key

      Returns Promise<number>

      Integer, specifically the array's new size.

rejson_module_arrindex: (key: string, scalar: string, path?: string) => Promise<number>

Type declaration

    • (key: string, scalar: string, path?: string): Promise<number>
    • Retrieving JSON key array item by index

      Parameters

      • key: string

        The name of the key

      • scalar: string

        The scalar to filter out a JSON key

      • Optional path: string

        The path of the key

      Returns Promise<number>

      Integer, specifically the position of the scalar value in the array, or -1 if unfound.

rejson_module_arrinsert: (key: string, index: number, json: string, path?: string) => Promise<number>

Type declaration

    • (key: string, index: number, json: string, path?: string): Promise<number>
    • Inserting item into JSON key array

      Parameters

      • key: string

        The name of the key

      • index: number

        The index to insert the JSON into the array

      • json: string

        The JSON string to insert into the array

      • Optional path: string

        The path of the key

      Returns Promise<number>

      Integer, specifically the array's new size.

rejson_module_arrlen: (key: string, path?: string) => Promise<number>

Type declaration

    • (key: string, path?: string): Promise<number>
    • Retrieving the length of a JSON key array

      Parameters

      • key: string

        The name of the key

      • Optional path: string

        The path of the key

      Returns Promise<number>

      Integer, specifically the array's length.

rejson_module_arrpop: (key: string, index: number, path?: string) => Promise<string>

Type declaration

    • (key: string, index: number, path?: string): Promise<string>
    • Poping an array item by index

      Parameters

      • key: string

        The name of the key

      • index: number

        The index of the array item to pop

      • Optional path: string

        The path of the key

      Returns Promise<string>

      Bulk String, specifically the popped JSON value.

rejson_module_arrtrim: (key: string, start: number, end: number, path?: string) => Promise<string>

Type declaration

    • (key: string, start: number, end: number, path?: string): Promise<string>
    • Triming an array by index range

      Parameters

      • key: string

        The name of the key

      • start: number

        The starting index of the trim

      • end: number

        The ending index of the trim

      • Optional path: string

        The path of the key

      Returns Promise<string>

      Integer, specifically the array's new size.

rejson_module_clear: (key: string, path?: string) => Promise<number>

Type declaration

    • (key: string, path?: string): Promise<number>
    • Clearing a JSON key

      Parameters

      • key: string

        The name of the key

      • Optional path: string

        The path of the key defaults to root if not provided. Non-existing keys and paths are ignored. Deleting an object's root is equivalent to deleting the key from Redis.

      Returns Promise<number>

      The number of paths deleted (0 or 1).

rejson_module_debug: (subcommand: "HELP" | "MEMORY", key?: string, path?: string) => Promise<number | string[]>

Type declaration

    • (subcommand: "HELP" | "MEMORY", key?: string, path?: string): Promise<number | string[]>
    • Executing debug command

      Parameters

      • subcommand: "HELP" | "MEMORY"

        The subcommand of the debug command

      • Optional key: string

        The name of the key

      • Optional path: string

        The path of the key

      Returns Promise<number | string[]>

      MEMORY returns an integer, specifically the size in bytes of the value HELP returns an array, specifically with the help message

rejson_module_del: (key: string, path?: string) => Promise<number>

Type declaration

    • (key: string, path?: string): Promise<number>
    • Deleting a JSON key

      Parameters

      • key: string

        The name of the key

      • Optional path: string

        The path of the key defaults to root if not provided. Non-existing keys and paths are ignored. Deleting an object's root is equivalent to deleting the key from Redis.

      Returns Promise<number>

      The number of paths deleted (0 or 1).

rejson_module_forget: (key: string, path?: string) => Promise<number>

Type declaration

    • (key: string, path?: string): Promise<number>
    • An alias of delCommand

      Parameters

      • key: string

        The name of the key

      • Optional path: string

        The path of the key

      Returns Promise<number>

      The number of paths deleted (0 or 1).

rejson_module_get: (key: string, path?: string, parameters?: ReJSONGetParameters) => Promise<string>

Type declaration

    • Retrieving a JSON key

      Parameters

      • key: string

        The name of the key

      • Optional path: string

        The path of the key

      • Optional parameters: ReJSONGetParameters

        Additional parameters to arrange the returned values

      Returns Promise<string>

      The value at path in JSON serialized form.

rejson_module_mget: (keys: string[], path?: string) => Promise<string[]>

Type declaration

    • (keys: string[], path?: string): Promise<string[]>
    • Retrieving values from multiple keys

      Parameters

      • keys: string[]

        A list of keys

      • Optional path: string

        The path of the keys

      Returns Promise<string[]>

      The values at path from multiple key's. Non-existing keys and non-existing paths are reported as null.

rejson_module_numincrby: (key: string, number: number, path?: string) => Promise<string>

Type declaration

    • (key: string, number: number, path?: string): Promise<string>
    • Increasing JSON key value by number

      Parameters

      • key: string

        The name of the key

      • number: number

        The number to increase by

      • Optional path: string

        The path of the key

      Returns Promise<string>

      Bulk String, specifically the stringified new value.

rejson_module_nummultby: (key: string, number: number, path?: string) => Promise<string>

Type declaration

    • (key: string, number: number, path?: string): Promise<string>
    • Multiplying JSON key value by number

      Parameters

      • key: string

        The name of the key

      • number: number

        The number to multiply by

      • Optional path: string

        The path of the key

      Returns Promise<string>

      Bulk String, specifically the stringified new value.

rejson_module_objkeys: (key: string, path?: string) => Promise<string[]>

Type declaration

    • (key: string, path?: string): Promise<string[]>
    • Retrieving an array of JSON keys

      Parameters

      • key: string

        The name of the key

      • Optional path: string

        The path of the key

      Returns Promise<string[]>

      Array, specifically the key names in the object as Bulk Strings.

rejson_module_objlen: (key: string, path?: string) => Promise<number>

Type declaration

    • (key: string, path?: string): Promise<number>
    • Retrieving the length of a JSON

      Parameters

      • key: string

        The name of the key

      • Optional path: string

        The path of the key

      Returns Promise<number>

      Integer, specifically the number of keys in the object.

rejson_module_resp: (key: string, path?: string) => Promise<string[]>

Type declaration

    • (key: string, path?: string): Promise<string[]>
    • Retrieving a JSON key value in RESP protocol

      Parameters

      • key: string

        The name of the key

      • Optional path: string

        The path of the key

      Returns Promise<string[]>

      Array, specifically the JSON's RESP form as detailed.

rejson_module_set: (key: string, path: string, json: string, condition?: "NX" | "XX") => Promise<"OK">

Type declaration

    • (key: string, path: string, json: string, condition?: "NX" | "XX"): Promise<"OK">
    • Setting a new JSON key

      Parameters

      • key: string

        The name of the key

      • path: string

        The path of the key

      • json: string

        The JSON string of the key i.e. '{"x": 4}'

      • Optional condition: "NX" | "XX"

        Optional. The condition to set the JSON in.

      Returns Promise<"OK">

      Simple String OK if executed correctly, or Null Bulk if the specified NX or XX conditions were not met.

rejson_module_strappend: (key: string, string: string, path?: string) => Promise<string>

Type declaration

    • (key: string, string: string, path?: string): Promise<string>
    • Appending string to JSON key string value

      Parameters

      • key: string

        The name of the key

      • string: string

        The string to append to key value

      • Optional path: string

        The path of the key

      Returns Promise<string>

      Integer, specifically the string's new length.

rejson_module_strlen: (key: string, path?: string) => Promise<number>

Type declaration

    • (key: string, path?: string): Promise<number>
    • Retrieving the length of a JSON key value

      Parameters

      • key: string

        The name of the key

      • Optional path: string

        The path of the key

      Returns Promise<number>

      Integer, specifically the string's length.

rejson_module_toggle: (key: string, path?: string) => Promise<boolean>

Type declaration

    • (key: string, path?: string): Promise<boolean>
    • Toggling a JSON key

      Parameters

      • key: string

        The name of the key

      • Optional path: string

        The path of the key defaults to root if not provided. Non-existing keys and paths are ignored. Deleting an object's root is equivalent to deleting the key from Redis.

      Returns Promise<boolean>

      The value of the path after the toggle.

rejson_module_type: (key: string, path?: string) => Promise<string>

Type declaration

    • (key: string, path?: string): Promise<string>
    • Retrieving the type of a JSON key

      Parameters

      • key: string

        The name of the key

      • Optional path: string

        The path of the key

      Returns Promise<string>

      Simple String, specifically the type of value.

returnRawResponse: boolean
risCommander: RedisIntervalSetsCommander = ...
risHelpers: RedisIntervalSetsHelpers = ...
ris_module_add: (key: string, sets: RedisIntervalSet[]) => Promise<"OK">

Type declaration

    • Adding an interval set

      Parameters

      • key: string

        The name of the key

      • sets: RedisIntervalSet[]

        A list of sets to create. At least 1 set is required.

      Returns Promise<"OK">

ris_module_del: (key: string, setNames?: string[]) => Promise<"OK">

Type declaration

    • (key: string, setNames?: string[]): Promise<"OK">
    • Deleting a all interval sets under a key, or a single/list of specific set/s.

      Parameters

      • key: string

        The name of the key

      • Optional setNames: string[]

        Optional. A list of set names to delete. If not passed all interval sets under key will be removed.

      Returns Promise<"OK">

ris_module_get: (key: string, setName?: string) => Promise<RedisIntervalSet[]>

Type declaration

    • Retrieving all of key interval sets/a single set.

      Parameters

      • key: string

        The name of the key

      • Optional setName: string

        Optional. The name of specific set. If not passed all interval sets under key will be retrieved.

      Returns Promise<RedisIntervalSet[]>

ris_module_notScore: (key: string, score: number) => Promise<string[]>

Type declaration

    • (key: string, score: number): Promise<string[]>
    • Retrieving all sets under a key that don't have a specific score in their range.

      Parameters

      • key: string

        The name of the key

      • score: number

        The score of the set

      Returns Promise<string[]>

ris_module_score: (key: string, score: number) => Promise<string[]>

Type declaration

    • (key: string, score: number): Promise<string[]>
    • Retrieving all sets under a key that have a specific score in their range.

      Parameters

      • key: string

        The name of the key

      • score: number

        The score of the set

      Returns Promise<string[]>

rtsCommander: RedisTimeSeriesCommander = ...
rts_module_add: (key: string, timestamp: string, value: string, options?: TSAddOptions) => Promise<number>

Type declaration

    • (key: string, timestamp: string, value: string, options?: TSAddOptions): Promise<number>
    • Appending/creating a new sample to series

      Parameters

      • key: string

        The key

      • timestamp: string

        The timestamp

      • value: string

        The value

      • Optional options: TSAddOptions

        The 'TS.ADD' command optional parameters

      Returns Promise<number>

rts_module_alter: (key: string, options?: TSAlterOptions) => Promise<"OK">

Type declaration

    • (key: string, options?: TSAlterOptions): Promise<"OK">
    • Altering an existing TS key

      Parameters

      • key: string

        Required. The key

      • Optional options: TSAlterOptions

      Returns Promise<"OK">

rts_module_create: (key: string, options?: TSCreateOptions) => Promise<"OK">

Type declaration

    • Creating a new TS key

      Parameters

      • key: string

        The key

      • Optional options: TSCreateOptions

        The 'TS.CREATE' optional parameter

      Returns Promise<"OK">

      "OK"

rts_module_createrule: (parameters: TSCreateRule) => Promise<"OK">

Type declaration

    • Creating a compaction rule

      Parameters

      • parameters: TSCreateRule

        The 'TS.CREATERULE' command optional parameters

      Returns Promise<"OK">

rts_module_decrby: (key: string, value: string, options?: TSIncrbyDecrbyOptions) => Promise<number>

Type declaration

    • Creating a new sample that decrements the latest sample's value

      Parameters

      • key: string

        The key

      • value: string

        The value

      • Optional options: TSIncrbyDecrbyOptions

        The 'TS.DECRBY' command optional parameters

      Returns Promise<number>

rts_module_del: (key: string, fromTimestamp: string, toTimestamp: string) => Promise<number>

Type declaration

    • (key: string, fromTimestamp: string, toTimestamp: string): Promise<number>
    • Delete data points for a given timeseries and interval range in the form of start and end delete timestamps.

      Parameters

      • key: string

        Key name for timeseries

      • fromTimestamp: string

        Start timestamp for the range deletion.

      • toTimestamp: string

        End timestamp for the range deletion.

      Returns Promise<number>

      The count of samples deleted

rts_module_deleterule: (sourceKey: string, destKey: string) => Promise<"OK">

Type declaration

    • (sourceKey: string, destKey: string): Promise<"OK">
    • Deleting a compaction rule

      Parameters

      • sourceKey: string

        The source key

      • destKey: string

        The dest key

      Returns Promise<"OK">

rts_module_get: (key: string) => Promise<(string | number)[]>

Type declaration

    • (key: string): Promise<(string | number)[]>
    • Retrieving the last sample of a key

      Parameters

      • key: string

        The key

      Returns Promise<(string | number)[]>

rts_module_incrby: (key: string, value: string, options?: TSIncrbyDecrbyOptions) => Promise<number>

Type declaration

    • Creating a new sample that increments the latest sample's value

      Parameters

      • key: string

        The key

      • value: string

        The value

      • Optional options: TSIncrbyDecrbyOptions

        The 'TS.INCRBY' command optional parameters

      Returns Promise<number>

rts_module_info: (key: string) => Promise<TSInfo>

Type declaration

    • (key: string): Promise<TSInfo>
    • Retrieving information and statistics on the time-series

      Parameters

      • key: string

        The key

      Returns Promise<TSInfo>

rts_module_madd: (keySets: TSKeySet[]) => Promise<number[]>

Type declaration

    • (keySets: TSKeySet[]): Promise<number[]>
    • Appending new samples to a list of series

      Parameters

      Returns Promise<number[]>

rts_module_mget: (filter: string, withLabels?: boolean) => Promise<(string | number)[][]>

Type declaration

    • (filter: string, withLabels?: boolean): Promise<(string | number)[][]>
    • Retrieving the last sample of a key by filter

      Parameters

      • filter: string

        Required. The filter

      • Optional withLabels: boolean

        Optional. If to add the 'WITHLABELS' Optional parameter

      Returns Promise<(string | number)[][]>

rts_module_mrange: (fromTimestamp: string, toTimestamp: string, filter: string, options?: TSMRangeOptions) => Promise<(string | number)[][]>

Type declaration

    • (fromTimestamp: string, toTimestamp: string, filter: string, options?: TSMRangeOptions): Promise<(string | number)[][]>
    • Querying a range across multiple time-series by filters in forward directions

      Parameters

      • fromTimestamp: string

        The starting timestamp

      • toTimestamp: string

        The ending timestamp

      • filter: string

        The filter

      • Optional options: TSMRangeOptions

        The 'TS.MRange' command optional parameters

      Returns Promise<(string | number)[][]>

rts_module_mrevrange: (fromTimestamp: string, toTimestamp: string, filter: string, options?: TSMRangeOptions) => Promise<(string | number)[][]>

Type declaration

    • (fromTimestamp: string, toTimestamp: string, filter: string, options?: TSMRangeOptions): Promise<(string | number)[][]>
    • Querying a range across multiple time-series by filters in reverse directions

      Parameters

      • fromTimestamp: string

        The starting timestamp

      • toTimestamp: string

        The ending timestamp

      • filter: string

        The filter

      • Optional options: TSMRangeOptions

        The 'TS.MRange' command optional parameters

      Returns Promise<(string | number)[][]>

rts_module_queryindex: (filter: string) => Promise<string[]>

Type declaration

    • (filter: string): Promise<string[]>
    • Retrieving all the keys matching the filter list

      Parameters

      • filter: string

        The filter

      Returns Promise<string[]>

rts_module_range: (key: string, fromTimestamp: string, toTimestamp: string, options?: TSRangeOptions) => Promise<[number, string][]>

Type declaration

    • (key: string, fromTimestamp: string, toTimestamp: string, options?: TSRangeOptions): Promise<[number, string][]>
    • Querying a range in forward directions

      Parameters

      • key: string

        The key

      • fromTimestamp: string

        The starting timestamp

      • toTimestamp: string

        The ending timestamp

      • Optional options: TSRangeOptions

        The 'TS.Range' command optional parameters

      Returns Promise<[number, string][]>

rts_module_revrange: (key: string, fromTimestamp: string, toTimestamp: string, options?: TSRangeOptions) => Promise<[number, string][]>

Type declaration

    • (key: string, fromTimestamp: string, toTimestamp: string, options?: TSRangeOptions): Promise<[number, string][]>
    • Querying a range in reverse directions

      Parameters

      • key: string

        The key

      • fromTimestamp: string

        The starting timestamp

      • toTimestamp: string

        The ending timestamp

      • Optional options: TSRangeOptions

        The 'TS.Range' command optional parameters

      Returns Promise<[number, string][]>

searchCommander: SearchCommander = ...
searchHelpers: RedisearchHelpers = ...
search_module_aggregate: (index: string, query: string, parameters?: FTAggregateParameters) => Promise<FTAggregateResponse>

Type declaration

    • Runs a search query on an index, and performs aggregate transformations on the results, extracting statistics etc from them

      Parameters

      • index: string

        The index

      • query: string

        The query

      • Optional parameters: FTAggregateParameters

        The additional optional parameters

      Returns Promise<FTAggregateResponse>

      Array Response. Each row is an array and represents a single aggregate result

search_module_aliasadd: (name: string, index: string) => Promise<string>

Type declaration

    • (name: string, index: string): Promise<string>
    • Adding alias fron an index

      Parameters

      • name: string

        The alias name

      • index: string

        The alias index

      Returns Promise<string>

      'OK' or error

search_module_aliasdel: (name: string) => Promise<string>

Type declaration

    • (name: string): Promise<string>
    • Deleting alias fron an index

      Parameters

      • name: string

        The alias name

      Returns Promise<string>

      'OK' or error

search_module_aliasupdate: (name: string, index: string) => Promise<string>

Type declaration

    • (name: string, index: string): Promise<string>
    • Updating alias index

      Parameters

      • name: string

        The alias name

      • index: string

        The alias index

      Returns Promise<string>

      'OK' or error

search_module_alter: (index: string, field: string, fieldType: string, options?: FTFieldOptions) => Promise<string>

Type declaration

    • (index: string, field: string, fieldType: string, options?: FTFieldOptions): Promise<string>
    • Adding a new field to the index

      Parameters

      • index: string

        The index

      • field: string

        The field name

      • fieldType: string

        The field type

      • Optional options: FTFieldOptions

        The additional optional parameters

      Returns Promise<string>

      'OK' or error

search_module_config: (commandType: "GET" | "SET" | "HELP", option: string, value?: string) => Promise<FTConfig>

Type declaration

    • (commandType: "GET" | "SET" | "HELP", option: string, value?: string): Promise<FTConfig>
    • Retrieves, describes and sets runtime configuration options

      Parameters

      • commandType: "GET" | "SET" | "HELP"

        The command type

      • option: string

        The option

      • Optional value: string

        In case of 'SET' command, a valid value to set

      Returns Promise<FTConfig>

      If 'SET' command, returns 'OK' for valid runtime-settable option names and values. If 'GET' command, returns a string with the current option's value.

search_module_create: (index: string, indexType: FTIndexType, schemaFields: FTSchemaField[], parameters?: FTCreateParameters) => Promise<string>

Type declaration

    • Creating an index with a given spec

      Parameters

      • index: string

        The index of the schema

      • indexType: FTIndexType

        The index type of the schema

      • schemaFields: FTSchemaField[]

        The filter set after the 'SCHEMA' argument

      • Optional parameters: FTCreateParameters

        The additional parameters of the spec

      Returns Promise<string>

      'OK' or error

search_module_dictadd: (dict: string, terms: string[]) => Promise<number>

Type declaration

    • (dict: string, terms: string[]): Promise<number>
    • Adding terms to a dictionary

      Parameters

      • dict: string

        The dictionary

      • terms: string[]

        A list of terms

      Returns Promise<number>

      The number of new terms that were added

search_module_dictdel: (dict: string, terms: string[]) => Promise<number>

Type declaration

    • (dict: string, terms: string[]): Promise<number>
    • Deleting terms from a dictionary

      Parameters

      • dict: string

        The dictionary

      • terms: string[]

        A list of terms

      Returns Promise<number>

      The number of terms that were deleted

search_module_dictdump: (dict: string) => Promise<string>

Type declaration

    • (dict: string): Promise<string>
    • Dumps all terms in the given dictionary

      Parameters

      • dict: string

        The dictionary

      Returns Promise<string>

      An array, where each element is term

search_module_dropindex: (index: string, deleteHash?: boolean) => Promise<string>

Type declaration

    • (index: string, deleteHash?: boolean): Promise<string>
    • Deleting the index

      Parameters

      • index: string

        The index

      • deleteHash: boolean = false

        If set, the drop operation will delete the actual document hashes.

      Returns Promise<string>

      'OK' or error

search_module_explain: (index: string, query: string) => Promise<string>

Type declaration

    • (index: string, query: string): Promise<string>
    • Retrieving the execution plan for a complex query

      Parameters

      • index: string

        The index

      • query: string

        The query

      Returns Promise<string>

      Returns the execution plan for a complex query

search_module_explainCLI: (index: string, query: string) => Promise<string[]>

Type declaration

    • (index: string, query: string): Promise<string[]>
    • Retrieving the execution plan for a complex query but formatted for easier reading without using redis-cli --raw

      Parameters

      • index: string

        The index

      • query: string

        The query

      Returns Promise<string[]>

      A string representing the execution plan.

search_module_info: (index: string) => Promise<FTInfo>

Type declaration

    • (index: string): Promise<FTInfo>
    • Retrieving infromation and statistics on the index

      Parameters

      • index: string

        The index

      Returns Promise<FTInfo>

      A nested array of keys and values.

search_module_search: (index: string, query: string, parameters?: FTSearchParameters) => Promise<FTSearchResponse>

Type declaration

    • Searching the index with a textual query

      Parameters

      • index: string

        The index

      • query: string

        The query

      • Optional parameters: FTSearchParameters

        The additional optional parameter

      Returns Promise<FTSearchResponse>

      Array reply, where the first element is the total number of results, and then pairs of document id, and a nested array of field/value.

search_module_spellcheck: (index: string, query: string, options?: FTSpellCheck) => Promise<FTSpellCheckResponse[]>

Type declaration

    • Performs spelling correction on a query

      Parameters

      • index: string

        The index

      • query: string

        The query

      • Optional options: FTSpellCheck

        The additional optional parameters

      Returns Promise<FTSpellCheckResponse[]>

      An array, in which each element represents a misspelled term from the query

search_module_sugadd: (key: string, suggestion: string, score: number, options?: FTSugAddParameters) => Promise<number>

Type declaration

    • (key: string, suggestion: string, score: number, options?: FTSugAddParameters): Promise<number>
    • Adds a suggestion string to an auto-complete suggestion dictionary

      Parameters

      • key: string

        The key

      • suggestion: string

        The suggestion

      • score: number

        The score

      • Optional options: FTSugAddParameters

        The additional optional parameters

      Returns Promise<number>

      The current size of the suggestion dictionary

search_module_sugdel: (key: string, suggestion: string) => Promise<number>

Type declaration

    • (key: string, suggestion: string): Promise<number>
    • Deleting a string from a suggestion index

      Parameters

      • key: string

        The key

      • suggestion: string

        The suggestion

      Returns Promise<number>

search_module_sugget: (key: string, prefix: string, options?: FTSugGetParameters) => Promise<string>

Type declaration

    • Retrieving completion suggestions for a prefix

      Parameters

      • key: string

        The key

      • prefix: string

        The prefix of the suggestion

      • Optional options: FTSugGetParameters

        The additional optional parameter

      Returns Promise<string>

      A list of the top suggestions matching the prefix, optionally with score after each entry

search_module_suglen: (key: string) => Promise<number>

Type declaration

    • (key: string): Promise<number>
    • Retrieving the size of an auto-complete suggestion dictionary

      Parameters

      • key: string

        The key

      Returns Promise<number>

search_module_syndump: (index: string) => Promise<{}>

Type declaration

    • (index: string): Promise<{}>
    • Dumps the contents of a synonym group

      Parameters

      • index: string

        The index

      Returns Promise<{}>

      A list of synonym terms and their synonym group ids.

search_module_synupdate: (index: string, groupId: number, terms: string[], skipInitialScan?: boolean) => Promise<"OK">

Type declaration

    • (index: string, groupId: number, terms: string[], skipInitialScan?: boolean): Promise<"OK">
    • Updating a synonym group

      Parameters

      • index: string

        The index

      • groupId: number

        The group id

      • terms: string[]

        A list of terms

      • skipInitialScan: boolean = false

        If set, we do not scan and index.

      Returns Promise<"OK">

      'OK'

search_module_tagvals: (index: string, field: string) => Promise<string[]>

Type declaration

    • (index: string, field: string): Promise<string[]>
    • Retrieving the distinct tags indexed in a Tag field

      Parameters

      • index: string

        The index

      • field: string

        The field name

      Returns Promise<string[]>

      The distinct tags indexed in a Tag field

showDebugLogs: boolean

Methods

  • applyMixins(baseObject: any, givenObjects: any[], addPrefix?: boolean): void
  • Applying mixings of given objects into base object

    Parameters

    • baseObject: any

      The base objects

    • givenObjects: any[]

      An array of given objects

    • addPrefix: boolean = true

      If to add a prefix of Object name to the properties as ObjectName_FunctionName

    Returns void

  • connect(): Promise<void>
  • Connecting to the Redis database with the module

    Returns Promise<void>

  • disconnect(): Promise<void>
  • Disconnecting from the Redis database with the module

    Returns Promise<void>

  • handleError(error: string): any
  • Handling a error

    Parameters

    • error: string

      The message of the error

    Returns any

  • handleResponse(response: any): any
  • Simpilizing the response of the Module command

    Parameters

    • response: any

      The array response from the module

    Returns any

  • isOnlyTwoDimensionalArray(array: any[]): boolean
  • Check if array is fully two dimensional. Only items in the array are arrays.

    Parameters

    • array: any[]

      The potential two dimensional array

    Returns boolean

  • paramToString(paramValue: string): string
  • Formatting given param value to string

    Parameters

    • paramValue: string

      The given param value

    Returns string

    A param value converted to string

  • reduceArrayDimension(array: any[][]): any[]
  • Reducing an array by one level. i.e. from two dimensional to 1 dimensional.

    Parameters

    • array: any[][]

      The potentional two dimensional array

    Returns any[]

  • sendCommand(data: CommandData): Promise<any>
  • Running a Redis command

    Parameters

    • data: CommandData

      The command data of a command to send. Consists of command and args.

    Returns Promise<any>

Generated using TypeDoc