Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Database
Created by Guest
Created on Aug 10, 2020

Allow multiple text indexes per collection

MongoDb only allow one text index by collection, in contrast of other index types. This is a limitation that makes it difficult to develop projects with search functionality, for example, if you want to add a text search for advanced users on all fields and a public search on a subset of fields, there isn't a simple and performant way to solve it. Many developers end up using other products like elastic search, or creating additional collections and using lookup, or using preg_reg or building smart indexes when the creation of multiple text indexes per collection would allow a quick, easy, and efficient solution for many of these scenarios.   This would be a good feature for mongodb :)
  • Attach files
  • Guest
    Sep 17, 2021
    We recommend using Atlas Search for this https://docs.atlas.mongodb.com/atlas-search/. It supports multiple indexes.