Secondary sorting for a filter

Discussion related to "Everything" 1.5 Alpha.
Post Reply
Mizufluffy
Posts: 62
Joined: Sun Jun 13, 2021 10:22 am

Secondary sorting for a filter

Post by Mizufluffy »

I was making a filter,

Code: Select all

exe: <basename:search: | pathpart:search:> <basename:search: | regex:description:"^search:"> !path:<install|setup|update|repair>
with macro app<search>
and at first I sorted it by Run Count in filter options. Soon after I realized that I wanted the sorting to be a little bit more sophisticated and changed search to this with additional sorting in mind:

Code: Select all

exe: <basename:search: | pathpart:search:> <basename:search: | regex:description:"^search:"> !path:<install|setup|update|repair> sort:filename-length sort-ascending:
It was working well until I realized it completely ignores Run Count sorting in the filter options that I wanted to be primary sorting method and filename-length to be secondary.

I know I could just remove sorting from filter & search, and sort it afterwards (or set one for primary and Shift+left click a column) but doing that everytime or even keeping such columns visible that I wouldn't need for any other purpose but sorting sounds like a hassle to me.

Is there currently a way to perform secondary sorting when setting up a filter? Or would it be possible to have such a feature in the future if it does not exist? Perhaps something like

Code: Select all

sort:"run count" sort-secondary:"filename-length"
Although, in that case it would be better if each sorting had their own ascending/descending options because I wanted Run Count to be descending and filename-length to be ascending.

Currently using Everything 1.5.0.1266a
Any good suggestions are very much appreciated. Thank you.
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Secondary sorting for a filter

Post by void »

I'll add an option to set the secondary sort for the next alpha update.
Thank you for the suggestion.

I'll post a comment here once it is available.
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Secondary sorting for a filter

Post by void »

Everything 1.5.0.1270a adds support for a secondary-sort: search function.

Example usage:
secondary-sort:size
secondary-sort:"date modified"
secondary-sort:size-ascending
secondary-sort:path-descending
secondary-sort:size secondary-sort-ascending:
secondary-sort:path secondary-sort-descending:
sort:"run count" sort-secondary:"filename-length"
Mizufluffy
Posts: 62
Joined: Sun Jun 13, 2021 10:22 am

Re: Secondary sorting for a filter

Post by Mizufluffy »

Awesome! Thanks a lot for this feature. I tried it a little and it seems to work exactly how I was hoping for. This gives a lot more freedom when defining custom searches for filters and bookmarks.
Post Reply