Code change

The below cell is not finding the index upon creating it:

# Check if the index already exists
index_exists = False
for index in collection.list_indexes():
    print(index)
    if index['name'] == vector_search_index_name_text:
        index_exists = True
        break

instead it should be [list_search_indexes instead of list_indexes]:

# Check if the index already exists
index_exists = False
for index in collection.list_search_indexes():
    print(index)
    if index['name'] == vector_search_index_name_text:
        index_exists = True
        break

to correctly identify the created index.

hi @ka_kuba

Thank you for the review. Probably notifying Short course about this would know if it’s related to metadata issue

@Mubsi can you please have a look at this.

Regards
DP

1 Like