@Marcos Duarte @WhiteFang_Jr @praveenks30#120294 @ash7 @OverclockedClock @BP
Hey, just leaving this here for some of ya'll I saw were interested in MongoDB Atlas incase you're still interested, or for anyone else that comes across this issue. From what I can tell @Logan M , you are correct that Atlas doesn't currently support the ability to create a search index via client libraries/api/mongosh. At least not for the M0 free cluster, or the other M2/M5 shared clusters (
reference). Although it looks like maybe its possible for the dedicated clusters, but I haven't tried it yet.
However, I've been able to find one weird solution that seems to work. You can use the
mongodbatlas Terraform provider to provision a
mongodbatlas_search_index resource. The only issue with this (other than it being a pain in the ass if you aren't already using Terraform lol) is that you can't create a collection with Terraform, and although provisioning a search index without an existing collection will return a 200, it will fail to actually create the index. Meaning you would need to run some kind of external script in order to create an empty collection before provisioning the index.
Here's what I came up with --------->