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

match nested fields of index keys

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

      Say I do this:

      c.ensureIndex({a:1});
      c.save({a:{b:1}});
      

      Right now I can match the following using the index key:

      c.find({a:{b:1}});
      

      But I can't match the following at the index level; I need to load 'b' from the full document.

      c.find({'a.b':1});
      

      Since the 'b' field is inside the index key, we could extract it for matching.

      Would need to make sure we test handling of multikey cases correctly, so for example:

      c.save({a:[{b:1},{c:2}]});
      c.find({'a.b':1,'a.c':2});
      

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: