简体   繁体   中英

Does TTL in Document DB (Cosmos DB) affect to index?

I am using Document DB. In previous days, I changed index of database and receive some "Not found document" error due to index transformation. I also plan to enable TimeToLive features of document DB but Azure alert:

Changing the TTL or Indexing Policy impacts query results while the index transformation occurs

If TTL is enabled, will "Not found document" or other negative impact happen again ?

Yes! Please see the following: Indexing policies and TTL

The Time-to-Live (TTL) feature requires indexing to be active on the container it is turned on. This means that:

  • it is not possible to activate TTL on a container where the indexing mode is set to None,
  • it is not possible to set the indexing mode to None on a container where TTL is activated.

For scenarios where no property path needs to be indexed, but TTL is required, you can use an indexing policy with:

  • an indexing mode set to Consistent, and
  • no included path, and
  • /* as the only excluded path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM