Understanding Result Ordering
Over time, Alfred learns your usage and presents sorted default results so that the most relevant result is always a few keystrokes away. If you'd like to understand a little more how Alfred achieves this, read on...
1. Rolling Knowledge
Alfred keeps a heuristic fingerprint of your usage, maintained on a 4 week rolling window. In other words, the more you use certain results within Alfred, the higher you'll see them in your default results list.
The usage graph you see in Alfred's preferences is based on this knowledge.
2. Keyword Latching
By default, Alfred latches the typed query phrase to the selected result. This is extremely useful when understood and leveraged, and works around the issue certain highly used results from dominating Alfred's coveted top result match.
For example, if you use Safari.app 100 times per day, and Spotify.app 10 times per day, but you always want Spotify as the top result when typing "s" into Alfred. With latching enabled, if you type "s" into Alfred, and select Spotify 2 or 3 times, Alfred will very quickly re-learn your intention, and always show Spotify for the keyword "s".
3. Default File Ordering
When Alfred has no internal knowledge of your file usage, the macOS metadata index has a couple of very useful fields which help the default result sorting. These are "Last Used", and "Last Modified", and are automatically maintained during normal usage of your Mac, both inside and outside of Alfred.
Alfred uses this default knowledge to present the most likely candidates at the top of his results.
Caveats and Troubleshooting
If Alfred's sorting isn't working as described above, there are a few things you can try:
Disable keyword latching
You may prefer Alfred to simply present the most used results at the top of the list. You can do this by disabling "Top Result Keyword Latching" in Alfred's Advanced Preferences.
Clear the knowledge
You can re-start Alfred's path to enlightenment by clearing his Knowledge in his Advanced Preferences. This will reset the prior knowledge and your usage graph.
Old or unused files being shown at the top
If you're seeing unexpected file based results at the top of Alfred's results, it's likely that something has happened to the underlying macOS metadata index. Alfred relies on the "Last Used" and "Last Modified" results being valid to even receive a collection of "recent" results which he can subsequently sort using internal knowledge.
In this case, it's best to rebuild the macOS metadata index to flush out these types of issues. Please be aware that this may also clear the "Last Used" flags, so it can take a few weeks of general macOS and Alfred usage after this to really start seeing great results!