Skip to content

Commit 2442063

Browse files
committed
copy stralgo comment from commands/core.py to commands/cluster.py
1 parent 584db04 commit 2442063

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

redis/commands/cluster.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,22 @@ def stralgo(
221221
**kwargs,
222222
):
223223
"""
224+
Implements complex algorithms that operate on strings.
225+
Right now the only algorithm implemented is the LCS algorithm
226+
(longest common substring). However new algorithms could be
227+
implemented in the future.
228+
229+
``algo`` Right now must be LCS
230+
``value1`` and ``value2`` Can be two strings or two keys
231+
``specific_argument`` Specifying if the arguments to the algorithm
232+
will be keys or strings. strings is the default.
233+
``len`` Returns just the len of the match.
234+
``idx`` Returns the match positions in each string.
235+
``minmatchlen`` Restrict the list of matches to the ones of a given
236+
minimal length. Can be provided only when ``idx`` set to True.
237+
``withmatchlen`` Returns the matches with the len of the match.
238+
Can be provided only when ``idx`` set to True.
239+
224240
For more information check https://redis.io/commands/stralgo
225241
"""
226242
target_nodes = kwargs.pop("target_nodes", None)

0 commit comments

Comments
 (0)