-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Text Search
-
Query Integration
-
0
The manual explains how a compound index that includes a FTS index as one part can significantly optimize queries, since the prefix fields will often narrow down the result set significantly.
http://docs.mongodb.org/manual/tutorial/limit-number-of-items-scanned-for-text-search/
However, creating such a compound index is often not possible, because MongoDB allows only a single FTS index per collection.
For example, to continue the example from the manual, you may want to sometimes search for "red car" across the entire store, without specifying a dept, while other times specifying the dept is possible and could be used to make the query faster. To enable such an optimization it is now necessary, and reasonable, to have both a top-level FTS index as well as a compound dept+FTS index for the same collection.
It seems the current limitation to have only one FTS index is arbitrary and should be lifted to allow using one or more compound indexes. (For clarity, having more than one top-level FTS index is of course not useful - at least if we ignore multiple languages and other advanced cases.)
- is duplicated by
-
SERVER-52829 Allow multiple text indices on one collection
- Closed
-
SERVER-22755 When does mongodb support many text fields?
- Closed
- is related to
-
SERVER-17648 Implement matcher for text predicates
- Backlog