lucid-mongo icon indicating copy to clipboard operation
lucid-mongo copied to clipboard

CosmosDB (Mongo) - does not contain shard key for pattern

Open lcnvdl opened this issue 5 years ago • 2 comments

Hi! I'm having problems using Lucid Mongo with Cosmos DB. The message is "does not contain shard key for pattern". It happens when I'm trying to find a document in a collection, without adding the "shard key" in the find method.

In Mongoose there's a solution: defining the shard keys in the schema:

new Schema({ .. }, { shardKey: { tag: 1, name: 1 }})

How can I do this using lucid mongo?

lcnvdl avatar Aug 12 '19 13:08 lcnvdl

any news on this?

omaratpxt avatar Mar 12 '20 13:03 omaratpxt

any news on this?

We had a lot of problems with Shard keys (wich are required for CosmosDB) and Lucid, so we've decided to stop using CosmosDB, and now we are using MongoDB Cloud. We don't have problems with this cloud service.

lcnvdl avatar Mar 12 '20 17:03 lcnvdl