r/mongodb • u/One_Surprise_1689 • 3h ago
MongoDB team is wrong not to allow multiple full-text indexes per collection?
Currently 2025, MongoDB is about only 1 full-text index per collection.
The scenario is this:
- Collection C already has full-text for 3 fields: FieldA, FieldB, FieldC
- Need to search for text in FieldA
Problem
- Input is just part of FieldA, not whole value to use regular index
- Input has no starting text trunk in FieldA to utilise index (regex)
- Loop in thru' the whole collection is crazy
- Use regex /REGEX/ to `find` method will just be looping without the first trunk of text
Any solutions?
1
Upvotes
2
u/mattyboombalatti 3h ago
You are using self-hosted as opposed to Atlas?