My collection has only parital index on one key . I want to shard the collection based on that partial indexed key, is it possible in mongodb 4.2, not able to figure it out from official documentation.
sample document in the collection
{ "_id" : ObjectId("5f16c2d0XYZ"), "company_url" : "https://www.linkedin.com/company/XYZ", "website" : "XYZ.com" }
partial index created like this:
db.collection.createIndex({"website":1}, { partialFilterExpression: { "website": { "$exists": true } } })
my cluster consists of 4 shards. I want to know even if its possible to shard, is it recommended?