[SERVER-57053] Rewriting $nor with a $text predicate to $not is invalid Created: 19/May/21  Updated: 29/Oct/23  Resolved: 20/May/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.2.15, 4.4.7, 5.0.0-rc0, 4.0.26, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Anton Korshunov Assignee: Anton Korshunov
Resolution: Fixed Votes: 0
Labels: post-rc0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0, v4.4, v4.2, v4.0
Sprint: Query Execution 2021-05-31
Participants:
Linked BF Score: 170

 Description   

When $nor expression has a single child node which contains a $text predicate, rewriting it to $not is invalid, since we forbid such constructs at the grammar level (since $text can only be applied to top-level documents). Applying this rewrite rule to such query could lead to incorrect plan selection.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 18/Jun/21 ]

Author:

{'name': 'Anton Korshunov', 'email': 'anton.korshunov@mongodb.com', 'username': 'antkorsh'}

Message: SERVER-57053 Split CanonicalQuery validation on pre- and post-normalization

(cherry picked from commit c1ac689d114e6681587ea24b009d61551653fee0)
(cherry picked from commit 157d39a0aea2b2c1dab68f2193fb6cad631e4a65)
(cherry picked from commit 7ce44276e1be8ad8dcac555a894cb90d72de62fe)
Branch: v4.0
https://github.com/mongodb/mongo/commit/78ab90f4beb4ba13601cf2d9f59881343621e1ed

Comment by Githook User [ 08/Jun/21 ]

Author:

{'name': 'Anton Korshunov', 'email': 'anton.korshunov@mongodb.com', 'username': 'antkorsh'}

Message: SERVER-57053 Split CanonicalQuery validation on pre- and post-normalization

(cherry picked from commit c1ac689d114e6681587ea24b009d61551653fee0)
(cherry picked from commit 157d39a0aea2b2c1dab68f2193fb6cad631e4a65)
Branch: v4.2
https://github.com/mongodb/mongo/commit/7ce44276e1be8ad8dcac555a894cb90d72de62fe

Comment by Githook User [ 02/Jun/21 ]

Author:

{'name': 'Anton Korshunov', 'email': 'anton.korshunov@mongodb.com', 'username': 'antkorsh'}

Message: SERVER-57053 Split CanonicalQuery validation on pre- and post-normalization

(cherry picked from commit c1ac689d114e6681587ea24b009d61551653fee0)
Branch: v4.4
https://github.com/mongodb/mongo/commit/157d39a0aea2b2c1dab68f2193fb6cad631e4a65

Comment by Githook User [ 21/May/21 ]

Author:

{'name': 'Anton Korshunov', 'email': 'anton.korshunov@mongodb.com', 'username': 'antkorsh'}

Message: SERVER-57053 Split CanonicalQuery validation on pre- and post-normalization

(cherry picked from commit c1ac689d114e6681587ea24b009d61551653fee0)
Branch: v5.0
https://github.com/mongodb/mongo/commit/52f236d77d90e1b0d6146cecbf2baf8185178908

Comment by Githook User [ 20/May/21 ]

Author:

{'name': 'Anton Korshunov', 'email': 'anton.korshunov@mongodb.com', 'username': 'antkorsh'}

Message: SERVER-57053 Split CanonicalQuery validation on pre- and post-normalization
Branch: master
https://github.com/mongodb/mongo/commit/c1ac689d114e6681587ea24b009d61551653fee0

Generated at Thu Feb 08 05:40:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.