Explicit `sort` parameter in query syntax

Use case or problem

With new embedded queries, it would be useful to have an explicit sort parameter.

Proposed solution

Add sort: to the query syntax.

Current workaround (optional)


Related feature requests (optional)



I agree, this would be great. A useful sort type would be alphabetical by matched text. One use case is sorting tasks by due date, e.g.

Note 1: - [ ] 20210225 Task 1
Note 2: - [ ] 20210110 Task 2
Note 3: - [ ] 20201220 Overdue task

When sorting by matched text, the results would be:

- [ ] 20201220 Overdue task
- [ ] 20210110 Task 2
- [ ] 20210225 Task 1

This is for my workflow extremely important. Especially when you deal with long Tag Lists to sort from newest to oldest you need this kind of sorting.

1 Like

+1 for this. That said you’re keying off the alphanumeric task name itself whereas I am actually looking to sort by file modification data. I think both are valid options.

Especially if you search fir follow ups and todos a sort by modification date is important.

1 Like

Yip +1 for this feature - same sort options like the current search but with a sort parameters in the query.

Up-voting this feature request. +1

1 Like

Also adding my +1. Thanks!

+1 from me too

+1 for me too

This doesn’t exist yet right? +1

Bumped! Sort functionality is super-important for embedded queries. Tryna make a daily note MOC without the ability to sort by newest first is kinda lame.

+1 to this feature

Use case or problem

The query code block should also include the sort order from the manual find feature and show the values for the sort

Proposed solution

sort-order: new-first

Or a similar syntax with 1:1 correspondence to the manual find UI parameters.

When dealing with lots of files for editing, good to see the oldest or newest files that need attention.

Current workaround (optional)

Use manual sort and type in search info.

Related feature requests (optional)