Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Vector Search
Created by Guest
Created on Oct 7, 2024

Add "await" option for search index operations

Extend createSearchIndex options to include an await boolean type that polls listSearchIndexes to determine the state of a search index operation. Something like this: db.movies.createSearchIndex( "example-index", { mappings: { dynamic: true }, await: true }, ) Index creation used to have an option to create indexes in the "foreground" which is essentially the same as the request in this ticket. As Atlas Vector Search becomes more popular, drivers are likely to see a number of user complaints about the asynchronous nature of operating search indexes. The specifications expect users to poll listSearchIndexes to determine the state of the operation. Given this recommendation, it would be natural for drivers (and the server) to provide users with a convenience await option. It's notable that polling listSearchIndexes can require a large amount of non-obvious code depending on the language.