Ananya
1 min readSep 1, 2020

--

Although MongoDB provides a lot of search functionalities, yet there are certain features which it does not support like:

1. There is no search based on synonyms

2. There is no support of using your custom stemmers and custom stop words list

3. You can only define one $text index for the entire collection

4. You cannot use hint() with $text

Elasticsearch, in my opinion, is much more advanced and meets most of the search requirements compared to MongoDB.

Regarding performance, according to the official MongoDB documentation :

1. "text indexes can be large. They contain one index entry for each unique post-stemmed word in each indexed field for each document inserted."

2. Insertion throughput is impacted when we create a $text index

3. Phrase searches are slower compared to token based search

Reference:

https://docs.mongodb.com/manual/core/index-text/#storage-requirements-and-performance-costs

--

--

Ananya
Ananya

Written by Ananya

Software Developer | Technical Writer | Technology Enthusiast