ElasticSearch vs MongoDB Atlas Search?

Hello,

We’re using MongoDB Atlas, and we’re already using ElasticSearch.

However, we face a lot of problems with the added burden of syncing data and schema changes between MongoDB and ElasticSearch, plus the extra cost of maintaining an ElasticSearch self-hosted instance.

We’re seeking the best full text-search across multiple collections, with suggestions and auto-complete functionality.

We are now considering MongoDB Atlas Search.

Here are the main issues we face with Atlas Search:

1 - Atlas Search requires Searching to happen as the first stage in an aggregation pipeline. This puts a limitation because sometimes we want to do an aggregation first (lookups, match, etc) then do the search on the data from the previous stages. Does anyone know if this is still a limitation or has things changed ? And what is the best approach in this case ? i.e. How can we search across multiple collections for example using the same search query ?

2 - Does Atlas Search provide the same auto-complete functionality as ElasticSearch ?

3 - Does Atlas Search provide the same search-suggestions functionality as ElasticSearch ?

Many thanks for your time and support

1 Like

Hi @Mohamed_Heiba - Welcome to the community :wave:

1 - Atlas Search requires Searching to happen as the first stage in an aggregation pipeline. This puts a limitation because sometimes we want to do an aggregation first (lookups, match, etc) then do the search on the data from the previous stages. Does anyone know if this is still a limitation or has things changed ? And what is the best approach in this case ? i.e. How can we search across multiple collections for example using the same search query ?

As of MongoDB version 6.0, you will be able to run cross-collection searches. You may find the following documentation / pages useful regarding this:

2 - Does Atlas Search provide the same auto-complete functionality as ElasticSearch ?

As per the autocomplete operator documentation:

The autocomplete operator performs a search for a word or phrase that contains a sequence of characters from an incomplete input string. You can use the autocomplete operator with search-as-you-type applications to predict words with increasing accuracy as characters are entered in your application’s search field.

Were there more specifics regarding what functionality you were after specifically or does the above described (or the documentation as well) cover the core functionality you are after with Atlas search specific to auto-complete?

3 - Does Atlas Search provide the same search-suggestions functionality as ElasticSearch ?

Could you provide some further use case details regarding this question? E.g. Is the search input “Naw York” and the expected output (or suggestion) “New York”?

There are a few features which may provide the functionality you are after but it will depend on the use case:

Having said those, I would like to state that I’m not an expert in ElasticSearch (we are a MongoDB forum after all :slight_smile: ). Regarding Atlas Search, one resource that might be of interest to you is the tutorials on Atlas Search that should provide a general overview of Atlas Search’s capabilities as of today.

Regards,
Jason

2 Likes