Ensuring HNSW Indexes Exist #111
Answered
by
zh217
techieAgnostic
asked this question in
Q&A
-
Hello. Is there an idiomatic way to ensure tables and indexes exist? Thank you |
Beta Was this translation helpful? Give feedback.
Answered by
zh217
May 12, 2023
Replies: 1 comment 1 reply
-
We will work out a way. Note that Meanwhile you can try:
for s in schema:
db.run(s)
except QueryException as e:
if e.code == 'eval::stored_relation_conflict':
logger.warning('Database already initialized.')
else:
raise For indices (every kind of indices), look for |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
techieAgnostic
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We will work out a way. Note that
:replace
may not be what you want: it removes everything from the old relation if it exists!Meanwhile you can
try ... catch ...
in the host language. If you use Python:For indices (every kind of indices), look for
e.code == 'tx::index_already_exists'
instead.