Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-57053

Rewriting $nor with a $text predicate to $not is invalid

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v5.0, v4.4, v4.2, v4.0
    • Sprint:
      Query Execution 2021-05-31
    • 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.

        Attachments

          Activity

            People

            Assignee:
            anton.korshunov Anton Korshunov
            Reporter:
            anton.korshunov Anton Korshunov
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: