[SERVER-22755] When does mongodb support many text fields? Created: 19/Feb/16  Updated: 19/Feb/16  Resolved: 19/Feb/16

Status: Closed
Project: Core Server
Component/s: Text Search
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Sergey Kazankov Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-17536 Allow multiple "text" indices on a co... Backlog
Participants:

 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



 Comments   
Comment by Ramon Fernandez Marina [ 19/Feb/16 ]

Hi kazankov, this feature was already requested in SERVER-17536, so I'm going to resolve this ticket as a duplicate. Please feel free to watch SERVER-17536 for updates and/or vote for it.

Regards,
Ramón.

Comment by Sergey Kazankov [ 19/Feb/16 ]

Please add quotes here: db.col.ensureIndex({'name <

Generated at Thu Feb 08 04:01:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.