Not a machine
Not a machine

Reputation: 551

Are Cloudant indexes presisted?

On what condition are Cloudant indexes deleted? I created five indexes via the web console on Monday and today I notice that only the default index on _id still remains.

I did delete all the records in the database earlier this week but not any of the indices. Are the indices deleted when the database contains no documents?

Upvotes: 0

Views: 112

Answers (1)

rhyshort
rhyshort

Reputation: 1453

Cloudant indexes are stored in design documents. Design documents are like regular documents but their id is prefixed with _design/ with it's contents providing meaning to the database setting up views, query indexes etc. The important bit to note is that the design document is a regular document, so it's included in list for all documents in the dashboard. When you deleted the all the documents in the Dashboard, you also deleted the design documents.

Upvotes: 2

Related Questions