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

Support text index on entire subdocument

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration

      Text indexes can apply to specific fields, or the entire document:

      db.c.createIndex({ a: 'text' })
      
      db.c.createIndex({ '$**': 'text' })
      

      The second case is called a wildcard text index, not to be confused with wildcard indexes.

      Wildcard indexes can apply to the whole document, or a subdocument:

      db.c.createIndex({ '$**': 1 })
      
      db.c.createIndex({ 'a.$**': 1 })
      

      To complete the analogy, we should support creating a text index on an entire subdocument:

      db.c.createIndex({ 'a.$**': 'text' })
      

            Assignee:
            backlog-query-integration [DO NOT USE] Backlog - Query Integration
            Reporter:
            david.percy@mongodb.com David Percy
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: