-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
(copied to CRM)
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' })