-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.6.0
-
Component/s: Aggregation Framework
-
None
-
Fully Compatible
-
ALL
-
v3.6
-
-
Query 2017-12-18, Query 2018-01-01
As part of SERVER-31785, I noticed that an aggregation like
db.coll.aggregate({$match: {$text: {$search: "foo"}}});
will return the text score even though it hasn't been requested. This seems like a bug, as it differs from the behavior of the find command, which does not return the text score. Interestingly, this only occurs when the query targets multiple shards in the cluster. If I add a predicate on the shard key and target one shard, the text score is not included.
charlie.swanson noted that this might be related to the change in SERVER-22760, which allows merging on mongos for certain pipelines. I've confirmed that this doesn't reproduce when setting internalQueryProhibitMergingOnMongoS, so we should investigate the mongos merging logic.
- is related to
-
SERVER-32297 Aggregations that merge on mongos do not respect the collation
- Closed
-
SERVER-22760 Sharded aggregation pipelines which involve taking a simple union should merge on mongos
- Closed