Skip to content

Commit

Permalink
Merge pull request #40 from RedisAI/fix.ft.create
Browse files Browse the repository at this point in the history
Ensure all primaries receive the FT.CREATE due to 'missing index error on querying' in multi-node scenarios
  • Loading branch information
filipecosta90 authored Jun 17, 2023
2 parents 0bcd51c + fb02421 commit f92c29b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ann_benchmarks/algorithms/redisearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def fit(self, X, offset=0, limit=None, hybrid_buckets = None):
elif self.algo == "FLAT":
args.extend(['vector', 'VECTOR', self.algo, '6', 'TYPE', 'FLOAT32', 'DIM', len(X[0]), 'DISTANCE_METRIC', self.metric])
print("Calling FT.CREATE", *args)
self.redis.execute_command('FT.CREATE', *args, target_nodes='random')
self.redis.execute_command('FT.CREATE', *args, target_nodes='primaries')
except Exception as e:
if 'Index already exists' not in str(e):
raise
Expand Down

0 comments on commit f92c29b

Please sign in to comment.