Allow subdocuments to be used in covered indexes

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • 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
            Reporter:
            Sylvain Zimmer
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: