Details
-
Question
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
-
None
Description
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 |
Attachments
Issue Links
- duplicates
-
SERVER-17536 Allow multiple "text" indices on a collection
-
- Backlog
-