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

Can't use $meta projection operator with field exclusions

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Querying
    • Query Optimization

    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

            backlog-query-optimization Backlog - Query Optimization
            fresheneesz Billy Tetrud
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated: