-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
None
-
3
-
TBD
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Context: When $scoreFusion was added to the grammar (see DEVPROD-14841), it was observed that various $scoreFusion queries with $limit stage(s) in the input pipeline exhibited a discrepancy in results across the optimizations and wildcard indexes tasks.
We should investigate why the inclusion of $limit led to these unexpected failures. In DEVPROD-14841, we've temporarily excluded the $limit stage from being generated in $scoreFusion queries to avoid hitting these failures.
TODOs:
- Investigate how and when inclusion of $limit in $scoreFusion queries creates a discrepancy in the results. See attached files of the failing and passing query. Note that the only difference is that {'$limit': NumberInt(6)} was removed from the input pipeline to the $scoreFusion query.
- Add js tests that explicitly test $scoreFusion queries with $limit in mongot and non-mongot input pipelines.
- Once this has been investigated. If it's determined that $limit is still a valid stage to include in $scoreFusion input pipelines, file a fuzzer ticket and update the fuzzer to reflect this. Might need to finetune the grammar to ensure that the inclusion of $limit in $scoreFusion input pipelines doesn't lead to a discrepancy in the results.