File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed
Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change 2222 Timestamp ,
2323)
2424from redisvl .redis .utils import array_to_buffer
25- from redisvl .utils .utils import create_ulid
2625
2726# TODO expand to multiple schema types and sync + async
2827
@@ -146,12 +145,11 @@ def sorted_range_query():
146145@pytest .fixture
147146def index (sample_data , redis_url ):
148147 # construct a search index from the schema
149- idx = f"user_index_{ create_ulid ()} "
150148 index = SearchIndex .from_dict (
151149 {
152150 "index" : {
153- "name" : idx ,
154- "prefix" : idx ,
151+ "name" : "user_index" ,
152+ "prefix" : "v1" ,
155153 "storage_type" : "hash" ,
156154 },
157155 "fields" : [
@@ -192,20 +190,17 @@ def hash_preprocess(item: dict) -> dict:
192190 yield index
193191
194192 # clean up
195- index .clear ()
196- index .delete ()
193+ index .delete (drop = True )
197194
198195
199196@pytest .fixture
200197def L2_index (sample_data , redis_url ):
201198 # construct a search index from the schema
202- idx = f"L2_index_{ create_ulid ()} "
203-
204199 index = SearchIndex .from_dict (
205200 {
206201 "index" : {
207- "name" : idx ,
208- "prefix" : idx ,
202+ "name" : "L2_index" ,
203+ "prefix" : "L2_index" ,
209204 "storage_type" : "hash" ,
210205 },
211206 "fields" : [
@@ -245,8 +240,7 @@ def hash_preprocess(item: dict) -> dict:
245240 yield index
246241
247242 # clean up
248- index .clear ()
249- index .delete ()
243+ index .delete (drop = True )
250244
251245
252246def test_search_and_query (index ):
You can’t perform that action at this time.
0 commit comments