Sort search results by file path

Use case or problem

In one of my vaults, I use folders to organize my notes, and I have named the folders so that they sort in an order that make sense for my vault. (The Johnny Decimal system is an example of this approach.)

However, when searching for a term within the content of files, the search plugin sorts the results by file name, so they are “out of order” in terms of how the vault organizes information.

Proposed solution

Please add an option to the sorting drop-down to sort by the full file path, not just the file name. This would make it possible for search results to be sorted in a way that complements the vault’s folder structure.

Current workaround (optional)

None, so far as I can tell. I haven’t found any features or plugins that order results by file path. Dataview is not an option in this case because it only allows searching for properties, not file content.

Related feature requests (optional)

The following request is similar, but is specific to searching for path: terms, whereas I would like a general sorting option for all search results: