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

Can't use $meta projection operator with field exclusions

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Query Optimization

      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.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            fresheneesz Billy Tetrud
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: