Skip to content

Fix vector search index creation failing with BadValue on Atlas Local#16

Open
henrik645 wants to merge 1 commit into
Ekman:mainfrom
henrik645:fix/vector-search-index-creation
Open

Fix vector search index creation failing with BadValue on Atlas Local#16
henrik645 wants to merge 1 commit into
Ekman:mainfrom
henrik645:fix/vector-search-index-creation

Conversation

@henrik645

Copy link
Copy Markdown

When updateSearchIndex is called for a new vector search index (fields-based, no mappings), Atlas Local validates the definition before checking existence and returns BadValue ("mappings is required") instead of IndexNotFound. This prevented the createSearchIndex fallback from ever being triggered.

Fix by also catching BadValue for vectorSearch-type definitions.

When updateSearchIndex is called for a new vector search index (fields-based,
no mappings), Atlas Local validates the definition before checking existence
and returns BadValue ("mappings is required") instead of IndexNotFound. This
prevented the createSearchIndex fallback from ever being triggered.

Fix by also catching BadValue for vectorSearch-type definitions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant