You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code on the indexing where we are creating vector embeddings can be optimized beacused I realized when you run the notebook more than once it creates a duplicate "indexing" which creates an error:
We can introduce a code line to delete the index if it exits
Like this :
Delete the index if it exists
es_client.indices.delete(index=index_name, ignore_unavailable=True)
# Create the new index
es_client.indices.create(index=index_name, body=index_settings)
print(f"Index '{index_name}' created successfully.")
The text was updated successfully, but these errors were encountered:
The code on the indexing where we are creating vector embeddings can be optimized beacused I realized when you run the notebook more than once it creates a duplicate "indexing" which creates an error:
We can introduce a code line to delete the index if it exits
Like this :
Delete the index if it exists
The text was updated successfully, but these errors were encountered: