-
Type:
Improvement
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: 2.3
-
Component/s: LINQ
-
None
-
None
-
Fully Compatible
-
None
-
None
-
None
-
None
-
None
-
None
My first issue here so please correct me if I make any mistakes posting it.
The aggregation framework that the 2.* driver maps to only uses indexes for the first match (https://docs.mongodb.com/v3.2/reference/operator/aggregation/match/).
I often pass aroung IQueryable to multiple layers in my applications that combine .Where(...) clauses to filter the result (depending on user input, access level etc).
The resulting query that the driver produces translates every .Where() clause to a $match. This results in poor performance since the indexes are only used for the first $match.
Would it be possible for the driver to combine these $match'es to a single $match?
- is duplicated by
-
CSHARP-1887 Сombine all $match in one $match
-
- Closed
-