lundi 22 décembre 2014

MongoDB Sharding : What should be the Sharding key if we want to find records with more than one field


I am having collection ("links") with listed fields:



collection-name: "links"
1) url
2) title
3) score
4) description
5) ratings (embedded_many)
and having index on "url", "title", "score"


because I need to find links based on these ("url", "title", "score") fields. query like : matching "url", "title" and "score" equal, gte, lte.


I would like to apply sharing on links collection.


Please guide me what should be the sharing-key and why ?





Aucun commentaire:

Enregistrer un commentaire