-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Integration
-
Fully Compatible
-
ALL
-
v8.1
-
200
For timeseries we always add a $_internalUnpackBucket stage in the beginning of the pipeline to change bucket documents into user expected documents. However, the $unionWith stage that is generated during the desugaring for $rankFusion
is on the buckets namespace, and we never add the $_internalUnpackBucket stage to turn buckets into user facing documents. This is a problem for two reasons:
- The pipelines in $rankFusion are running on different documents. One pipeline is sorting the user documents (because it does have the $_internalUnpackBucket stage and one pipeline (inside the $unionWith) is running on the buckets namespace and therefore sorting bucket documents.
- All of the subsequent stages will not have expected behavior for the bucket documents. Bucket documents have different field names, so all $sort stages are not doing any sorting because the field names are wrong.
Since rankFusion is most useful for search, vectorSearch and geoNear queries and those stages are all banned in timeseries collections, we should just ban rankFusion for now for timeseries collections
- is related to
-
SERVER-101661 Enable $rankFusion to run on views
-
- Backlog
-