I have a product collection, which allows users to filter/sort on 12 criterias. I think to cover all queries, I need to create about 50 indexes.
I don’t know if mongodb can handle those amount of queries well.
It sounds like you might want to re-think your data structure
3 Likes
the indexes they look very similar. For example, you have to create 2 indexes for 2 sorting queries.
.sort({a: 1, b: 1})
and
.sort({b: 1, a: 1})
A single collection can have *no more* than 64 indexes.
I’m almost there.
1 Like