learninglocker icon indicating copy to clipboard operation
learninglocker copied to clipboard

Document requests that have &sort= so that Indexes can be created for deployments to CosmosDB MongoAPI v3.6

Open ctm8788 opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe.

While CosmosDB MongoAPI is not officially supported, It may be the only option for organizations who are limited to Azure and are unable to use the MongoDB offered in the Azure Marketplace.

Describe the solution you'd like

Document all of the Indexes that need to be created to support deployment to CosmosDB

Describe alternatives you've considered

Our only option is to deploy via CosmosDB, we manually monitored network requests to find the requests that failed because they had sort= and no corresponding index.

Additional context

This would be to help prevent future headaches for users in a similar situation.

Below are most of the indexes...

// Indexes for CosmosDB MongoDB API

db.users.createIndex({"createdAt":-1,"_id":1}); db.organisations.createIndex({"name":1,"_id":-1}); db.users.createIndex({"email":1,"_id":-1}); db.organisations.createIndex({"createdAt":-1,"_id":1}); db.dashboards.createIndex({"createdAt":-1,"_id":-1}); db.dashboards.createIndex({"createdAt":-1,"_id":1}); db.visualisations.createIndex({"createdAt":-1,"_id":1}); db.queries.createIndex({"createdAt":-1,"_id":1}); db.querybuildercaches.createIndex({"createdAt":-1,"_id":1}); db.querybuildercachevalues.createIndex({"createdAt":-1,"_id":1}); db.lrs.createIndex({"createdAt":-1,"_id":1}); db.visualisations.createIndex({"createdAt":-1,"_id":-1}); db.statements.createIndex({"timestamp":-1,"_id":1}); db.statementforwarding.createIndex({"createdAt":-1,"_id":-1}); db.exports.createIndex({"createdAt":-1,"_id":1}); db.downloads.createIndex({"time":-1,"_id":1}); db.personasimports.createIndex({"createdAt":-1,"_id":-1}); db.lrs.createIndex({"createdAt":-1,"_id":-1}); db.users.createIndex({"createdAt":-1,"_id":-1}); db.role.createIndex({"title":1,"_id":1}); db.organisations.createIndex({"createdAt":-1,"_id":-1}); db.client.createIndex({"createdAt":-1,"_id":-1}); db.role.createIndex({"updatedAt":1,"_id":-1});

ctm8788 avatar Jun 17 '20 02:06 ctm8788

Additional Indexes for Personas: db.personas.createIndex({"createdAt":-1,"_id":1}); db.personas.createIndex({"name":1,"_id":1})

ctm8788 avatar Jul 01 '20 13:07 ctm8788