Atlas Search Sort and Count which engine works?

Hi,

When we make Sort or Count after $search, which engine is running for sort or count ?
It’s Lucene directly ( mongot ) or MongoDB ?

Thanks !

Hi @Jonathan_Gautier,

As far as I understand only the $search stage runs against the mongot index. Therefore one of the performance recommendations is to perform any query heavy filtering or operations in $search stage.

Considering this I think consecutive stages runs as part of regular MongoDB aggregation framework executor.

However, I can try and verify it with the search team.

Best
Pavel

@Pavel_Duchovny

Yes you can ! :wink:

I have lot of trouble when i have large database like more than millions documents. Sort and Count was toooooo slow for user experience. We need feature sort and count inside mongot, especialy when we have large database. I never had this problem with elasticsearch. I know Apache Lucene can handle Sort and Count or other operation like faceting.

I think if this dont work inside mongot, you need to develop this features with atlas search team.

Hi @Jonathan_Gautier,

So I have confirmed that mongot is responsible only for everything inside $search stage and nothing more at this point.

You should try to do anything possible there or in your data model to tune those queries at the moment.

Having said that, we are working on introducing new capabilities for the search server.

If you want to raise interest for our product team please open a feedback ticket at https://feedback.mongodb.com under the atlas sections.

Best
Pavel

1 Like