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

$meta "indexKey" produces no value for text indexes

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.4.0-rc2
    • Component/s: Querying
    • Query Integration

      The $meta "indexKey" expression appears to produce nothing when used with text indexes:

      db.c.createIndex({x: "text"});
      db.c.insert({x: "az b c"}); 
      db.c.find({x: {$text: {$search: "az"}}}, {key: {$meta: "indexKey"}});
      // resulting document does not have the index key

       

       

            Assignee:
            backlog-query-integration [DO NOT USE] Backlog - Query Integration
            Reporter:
            ian.boros@mongodb.com Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: