Hi
I am using MongoDB realm and I am trying to define the TTL index on my realm DB property. There are a couple of options to define an index on property. If I define the index manually it works as it should be and I am able to see the index and drop it in the atlas (Atlas → Browse Collections → Select Collection → Indexes). I have many clusters and would like to automate the process of creating indexes for all of them. To achieve that I need to either create an index using realm atlas API or create an index with Mongo-Cli.
For both cases, I have the same issue. I create an index and get a success message (“Index is being created” from the CLI and “{ }” from the API), but when I navigate to the Atlas → Browse Collections → Select Collection → Indexes screen and refresh the data I don’t see any new indexes, even a day after the added index does not appear.
When I try to create an index again on the same property I am getting this error
{"detail":"Unexpected error.","error":500,"errorCode":"UNEXPECTED_ERROR","parameters":[],"reason":"Internal Server Error"}
for both API and CLI.
So any ideas why this happens and why I am not able to see the newly added indexes?
Here is a sample of creating a single index on string property with Atlas-API
https://cloud.mongodb.com/api/atlas/v1.0/groups/6155e35b3fe240082e0e464d/clusters/msoisales-dev-eu2-atlas/index
{
"db": "msoisales-dev-eu2-realm",
"collection": "MasterItem",
"keys": [{ "Name": 1 }],
"collation": { "locale": "en_US", "strength": 2 }
}