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.

118 VOTE
Status Completed
Categories Atlas Search
Created by Guest
Created on Oct 6, 2020

Allow $count and $sort inside $search

Make $count and $sort directly with mongot, and dont lose time between mongot and mongodb.
  • ADMIN RESPONSE
    Oct 18, 2025
    At MongoDB World last week, we announced that faster counts are now available with sharded collections. We also announced a feature called Stored Source Fields which help you achieve faster post-aggregation performance. You can use this feature to experience faster sorting with Atlas Search. You can read more about these two ( https://www.mongodb.com/blog/post/new-ways-deliver-excellent-search-experiences-atlas-search ) features ( https://www.mongodb.com/blog/post/new-ways-deliver-excellent-search-experiences-atlas-search ) here. ( https://www.mongodb.com/blog/post/new-ways-deliver-excellent-search-experiences-atlas-search ) After trying Stored Source Fields, if it does not meet your performance requirements - please vote on this new feedback ( https://feedback.mongodb.com/forums/924868-atlas-search/suggestions/45316366-faster-sorting-with-atlas-search ) item. ( https://feedback.mongodb.com/forums/924868-atlas-search/suggestions/45316366-faster-sorting-with-atlas-search )
  • Guest
    Dec 8, 2022
    please allow $sort inside $search for big data
  • Guest
    Jul 25, 2022
    Having the the ability to sort big number of documents inside Atlas search is crucial. The alternative of using storedSource and sort stage after that is very slow and cannot be used in a user-facing application
  • Guest
    Jun 16, 2022
    Hello, I'd like to know if this feature has been released or worked on? I'd like to use the search feature but if I use it the sort is extremely slow so I won't be able to use it without it.
  • Guest
    Apr 14, 2022
    I think to add $sort and $count inside $search will be useful. But the implementation others Aggregation Pipeline Stages should need to do a $sort or $count at the end to have a clean query. Should be great if the $sort and $count as it is rigth now would be much faster.
  • Guest
    Mar 25, 2022
    A faster $sort and $count is very important for our use case. For $count the solution presented by Marcus is already working; but what about $sort? When should we be able to test it?
  • Guest
    Mar 14, 2022
    Hi Marcus, I did try the faster count and its performing well! I would need to know a way to perform faster sort as well.
  • Guest
    Feb 25, 2022
    Hi, Is this feature releasing soon? Do we know the timeline for it?
  • Guest
    Feb 11, 2022
    Do we have an ETA on $sort?
  • Guest
    Jan 19, 2022
    Have a collection with over 3 million documents. When conducting my Atlas $search aggregation without sorting, the results return anywhere from 30ms - 70ms... when I add a $sort the results ballon to anywhere from 150ms - 2s depending on my filter criteria. Would love for sorting in the $search stage to work! Looks like on Oct 11, 2021 someone on the Mongo team replied below that it would be best case one month, worst case two months when this feature would be available. It's been over 3 months now... any updates?!?
  • Guest
    Jan 7, 2022
    Hi, is there any update on when sorting within $search will be available? Many Thanks
  • Guest
    Jan 4, 2022
    Any update on this feature?
  • Guest
    Dec 28, 2021
    $sort inside $search is the last thing to replace elastic within our application :) - upvote.
  • Guest
    Dec 23, 2021
    A much anticipated feature. Would be nice to have update on release date.
  • Guest
    Dec 1, 2021
    Hello, the sort will be available too ? Any update about when ?
  • Guest
    Oct 11, 2021
    Best case, one month. Worst case, two.
  • Guest
    Oct 11, 2021
    Hi, is there any update on when this may be available? Thanks.
  • Guest
    Sep 30, 2021
    Would be a great feature to get out, hoping to hear something soon !
  • Guest
    Sep 23, 2021
    Is there any update regarding this feature?
  • Guest
    Aug 31, 2021
    Is there any estimate when it will be available?
  • Guest
    Jun 25, 2021
    Thanks for the update!! Looking forward to the new changes.
  • Load older comments
  • +18