Suppose I have this query over a Collection:
var dbMarkers = Features.AsQueryable<DBFeature>()
.OfType<DBPointFeature>()
.Where(f => f.parentFeatureSetId = parentFeatureSetId );
And the features are indexed (sparse) by:
{ "parentFeatureSetId": 1 }
As I understand, the C# driver uses the Type information DBFeature and DBPointFeature as an additional filter when building the query.
I would like to know if the Index is applied BEFORE the type Query, so it will be limited to the Index subset.
If not, it would be first fetching all the items of a particular type (which is a set much bigger than the idexed set), and the index would be almost pointless.
What is the behavior of MongoDB in this case?
Thank you very much!!