Search code examples
mongodbelasticsearchsolrsearch-enginemongodb-atlas

MongoDB Atlas Search vs Elasticsearch vs Solr performance


I want to verify which solution is the fastest one, when the only factor that matters is a speed of returned results.

My use case:

  • solution dedicated to product catalog - products and categories
  • 50 countries -> 50 different product catalogs (same structure - just want to differ per country)
  • each product catalog contains from 5k to 70k products
  • simple full text searches, fuzzy search, auto-complete, boosting of some products
  • facets support
  • gonna be integrated with Java Spring boot app with reactive stack (WebFlux) - microservice

Potential search engines:

All of them use Apache Lucene under the hood: https://lucene.apache.org/

I don't care about complexity of each solution, time required for indexation or any other things. The only factor i want to verify is which of them is the fastest one.

Examples:

  1. Index with 70k products. User types part of product name. Return 5 products that fit best.
  2. Index with 70k products. User clicks on category. Show paginated pages (25 results per page). On top show boosted products.
  3. Index with 70k products. User already see products within category. Additionally user wants to use 'In stock' facet (to see only products fully available now). Return paginated pages (25 results per page). On top show boosted products.

As all of those solutions use Apache Lucene their response time gonna look pretty much the same? Is any of those solutions much way better in this context than others?


Solution

  • All three solutions (MongoDB Atlas Search, Elasticsearch, and Apache Solr) are likely to perform quite well and should be able to handle your requirements effectively. One more solution can be Opensearch.

    To get an accurate assessment it is recommended to test with a performance benchmark where you simulate real-world search queries and measure the response times for each solution. It's too hard to test each scenario one by one so what you can do for faster choice is:

    use whichever you or your team know better :).