Hacker News new | past | comments | ask | show | jobs | submit login

I usually put multiple document types into a single collection and have a “type” field to get around this. The fields are indexed so this is efficient. To decide when to use a different collection I look at the scalability and other settings at the collection level, and group things that have similar needs together.



If you only have a few "type" options, that may be a poorly performing index unless it's used as a secondary to a query that narrows results more.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: