Suppose I have a users collection that I want to filter in a page of mine. The fields to be filtered on are name, age, location.
For this reason, I create a composite index (name, age, location). The issue is that I want to have the opportunity to filter by any combination of the 3 - name and age, name and location, age and location. When I try to do this, I am prompted to create another composite index for the used combination of fields.
My question is - does that mean that I have to add indexes for all possible composite combinations? If yes, how can I make this happen, if I want to potentially filter by 10 fields, and not only 3? Do I have to create indexes for all combinations myself?