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

Allow subdocuments to be used in covered indexes

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None

      eI'm familiar with the limitations of covered queries. Namely, from the docs (http://docs.mongodb.org/manual/tutorial/create-indexes-to-support-queries/#indexes-covered-queries) :

      { "user.login": 1 } doesn't index 
      db.users.find( { "user.login": "tester" }, { "user.login": 1, _id: 0 } )
      

      As a user this is really frustrating and doesn't make a lot of sense. I'm sure there may be internal design reasons, but is there really a theoretical reason it is not possible?

      This limitation is forcing us to dramatically change our schema design by migrating such fields off subdocuments. It is making us loose one of the main benefits of MongoDB so I would really like to see this limitation lifted, if possible.

      Thanks a lot!

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            sylvinus Sylvain Zimmer
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: