-
Type: Question
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Text Search
-
None
It is very strange that mongodb collection still can have only one text index.
Do you plan to support text search on multiple indexes?
This is how it can look like:
db.col.insert({name: 'dummy', 'keywords': ['key', 'word'], 'description': 'this is a dummy item'}); db.col.ensureIndex({'name: 'short', 'fields': ['dummy', 'keywords']}); db.col.ensureIndex({'name: 'full', 'fields': ['dummy', 'keywords', 'description']}); db.col.find({'$text': {'$search': 'dummy', '$textIndex': 'short'}}); //short text search for suggest db.col.find({'$text': {'$search': 'item', '$textIndex': 'full'}}); //full text search on all fields
- duplicates
-
SERVER-17536 Allow multiple "text" indices on a collection
- Backlog