Reverse sort order by default
I was a big RockMongo user and am now trying to switch over to Compass. I found it extremely convenient that in RockMongo, the default sort order was {_id: -1} because that means that you see the most recent records first. I didn't realize how useful this was until I discovered that Compass sorts in forward order. Either a "reverse order" button or simply a change to the default would be highly desireable.

We are excited to announce that the latest version of Compass, 1.45.3, introduces a new "Default Sort for Query Bar" setting. You can now select {_id: -1} or ($natural: -1} as the default sort for results returned by the query bar.
Upgrade your Compass application and configure the new setting to enable this feature today.
-
Brian commented
This is better than nothing, but in most cases I want to sort by {updated_at: -1}.
-
Igor commented
Good job? Good job???
Are you f kidding me?THIS IS A 2020 REQUEST. FOR A SORT.
This serves as a big evidence why MongoDB usage has been stuck. They've stopped iterating.
-
Daniel commented
Good job MongoDb@Team!
-
Brian commented
It would be useful, except it seems to fill in all the fields (query, project, etc), not just the one field you're typing in. A number of times I've typed in a complex query, a project of many fields, and chose a sort from the history, which wiped out all the other fields.
Plus, if I have to go to the field and type something, I could do the typing part with a keyboard macro or paste. I really want it to just sort automatically on what I tell it to when I view a collection.
-
Nicolas commented
That's what v1.43.6 does, you type a sort in any collection and next time a simple type of '{" in sort field will display the sort history you typed before for this collection.
Even better it will display histories with other fields.
In my view this is really smart and helpfull.
Once again thaks to Compass team
-
Ike commented
Wanted a custom sort by specifying what field, for my case I want to sort it by created_at field. And some collection I may want to be something else.
-
Nicolas commented
In V 1.43.6 there is an autocomplete of history that helps, thanks to Compass team.
-
Thang commented
I think it's good feature to save a lot of developer time.
-
Brian commented
_id: -1 sorts by created date, which is rarely what I want. I want to see what has been modified lately, even if it was the first document ever created, so updated_at: -1.
-
Cyril commented
so simple to implement in setting default sort.
I did it dozen of time every day sort {_id: -1}
please add it -
Daniel commented
Another MongoDB user in need of a default & configurable sort, please!
-
Daniel Nitu commented
This looks like a quick win that would improve UX a lot! To start with it can only be a simepl default sort {_id: -1} which we can toggle on/off in the settings.
100% of the time I need to look at documents, I want them sorted by the last one added first.
-
Michael Kubler commented
Given there's an [Edit] -> [Settings] section, you could allow the default sort order to be adjustable, with `{ _id: -1 }` being the default.
But that would allow people to remove it or set it to something else, like {createdAt: -1} or {name: 1}
Or even a sort order default lookup cascade, a global default you can change in the settings but a per collection overwrite. That way for a collection that doesn't have a "name" field you could use _id or whatever else and save that as the default for the collection.
This is more important now that the "Options v" button is so all the way to the right and harder to access.
Having to set the Sort all the time is a lot of effort and something I have to do multiple times a day.
-
Boštjan Pišler commented
+1
-
Nicolas commented
This idea has been suggested since a long time :
-
Netware commented
Need an option so the default sort order can be set to {_id: -1}, it's the biggest problem we have with Mongo Db Compass in our team right now.
-
Michael Kubler commented
I was just going to suggest this!
I really want to see it remember the previously used sort, or specify a default.Having `{_id: -1}` be the default would be perfect.
-
Vijay commented
Please provide default ordering settings { _id : -1 }
-
Ricardo Julian commented
Being able to specify a default ordering would improve the experience x100.
A good idea would be to be able to specify the default value the field "sort" has when a new tab is open.
The setting could be set in the "settings" of compass -
Thibaut Rousseau commented
Yes please.
When you test a feature and check the DB, you almost always want to see the last inserted entries first.