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

Can't use $meta projection operator with field exclusions

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Querying

      Description

      When doing something like:

      db.Something.find({},{$meta:'textScore',title:0})

      you get back the error "Can't canonicalize query: BadValue Projection cannot have a mix of inclusion and exclusion." You should be able to use exclusions with $meta just like you can with $elemMatch for example.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated: