0

I'm trying to create some TTL indexes in azure cosmosdb collections (mongo API), these collection's elements are all string or integer, but when I use the index spec

{
 "expireAfterSeconds":1000,
 "key": {"_ts":1}
 }

to create TTL indexes, some collections can be created correctly, but some tables return such error message: "{"Errors":["Fields in 'spatialIndexes' are only allowed with newer API versions. Update your API version from '2018-06-18' to '2018-09-17' leverage this new feature."

but I do nothing about spatialIndexes, so why I got this error?

1
  • The cosmosdb version is 3.2 Commented Jan 9, 2022 at 7:37

1 Answer 1

0

Looks like something upgraded the index. Upgrading to 3.6 or 4.0 should solve the issue.

Sign up to request clarification or add additional context in comments.

2 Comments

I'm curious about why other collections in the same DB can be created correctly
Not sure, need to see the activity logs if something was created already on this collection. You may create a support request

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.