Skip to content

Commit ec6f1ea

Browse files
committed
fix routing of dictionary methods
1 parent 41aab7e commit ec6f1ea

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/NRedisStack/Search/SearchCommandBuilder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public static SerializedCommand DictAdd(string dict, params string[] terms)
9191
throw new ArgumentOutOfRangeException("At least one term must be provided");
9292
}
9393

94-
var args = new List<object>(terms.Length + 1) { dict };
94+
var args = new List<object>(terms.Length + 1) { (RedisKey)dict };
9595
foreach (var t in terms)
9696
{
9797
args.Add(t);
@@ -107,7 +107,7 @@ public static SerializedCommand DictDel(string dict, params string[] terms)
107107
throw new ArgumentOutOfRangeException("At least one term must be provided");
108108
}
109109

110-
var args = new List<object>(terms.Length + 1) { dict };
110+
var args = new List<object>(terms.Length + 1) { (RedisKey)dict };
111111
foreach (var t in terms)
112112
{
113113
args.Add(t);
@@ -118,7 +118,7 @@ public static SerializedCommand DictDel(string dict, params string[] terms)
118118

119119
public static SerializedCommand DictDump(string dict)
120120
{
121-
return new(FT.DICTDUMP, dict);
121+
return new(FT.DICTDUMP, (RedisKey)dict);
122122
}
123123

124124
public static SerializedCommand DropIndex(string indexName, bool dd = false)

tests/NRedisStack.Tests/Search/SearchTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2679,6 +2679,7 @@ public void TestCrossTermDictionary(string endpointId)
26792679
}
26802680
};
26812681

2682+
Assert.Equal(0, DatabaseSize(db)); // in part, this is to allow replication to catch up
26822683
Assert.Equal(expected, ft.SpellCheck(index,
26832684
"Tooni toque kerfuffle",
26842685
new FTSpellCheckParams()

0 commit comments

Comments
 (0)