Skip to content

Commit c8cb715

Browse files
author
Ariel Shtul
authored
Call HSET after FT.CREATE to avoid keyspace scan (#1706)
1 parent 19819e0 commit c8cb715

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_search.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -643,9 +643,6 @@ def test_alias():
643643
index1 = getClient()
644644
index2 = getClient()
645645

646-
index1.hset("index1:lonestar", mapping={"name": "lonestar"})
647-
index2.hset("index2:yogurt", mapping={"name": "yogurt"})
648-
649646
def1 = IndexDefinition(prefix=["index1:"])
650647
def2 = IndexDefinition(prefix=["index2:"])
651648

@@ -654,6 +651,9 @@ def test_alias():
654651
ftindex1.create_index((TextField("name"),), definition=def1)
655652
ftindex2.create_index((TextField("name"),), definition=def2)
656653

654+
index1.hset("index1:lonestar", mapping={"name": "lonestar"})
655+
index2.hset("index2:yogurt", mapping={"name": "yogurt"})
656+
657657
res = ftindex1.search("*").docs[0]
658658
assert "index1:lonestar" == res.id
659659

0 commit comments

Comments
 (0)