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 Atlas Search
Created by Guest
Created on Jan 24, 2024

Ability to Upsert an Atlas Search Index

Currently, it is possible to use `createSearchIndex` and `updateSearchIndex` to create and update search indexes, respectively. It would be beneficial if the `updateSearchIndex` allowed for **upsert** functionality, so that if the index does not exist, it can be created. This functionality would be useful in certain scenarios where the indexes are created (if they don't exist) **or** updated (if they do exist) programmatically, which have to rely on implementing a custom if-else logic by leveraging `getSearchIndexes()`.