Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion db_update/Update.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ def update_database(overwrite=(len(sys.argv) > 1 and sys.argv[1] == '--overwrite
pc.delete_index(index_name)
print(f"Deleted existing index: {index_name}")

# Refresh index list before create check (could have been deleted in previous step)
existing_indexes = pc.list_indexes().names()

# Create the hybrid index (metric='dotproduct' is recommended for hybrid)
if index_name not in pc.list_indexes().names():
if index_name not in existing_indexes:
pc.create_index(
name=index_name,
dimension=384,
Expand Down