willfarrell / alfred-workflows

Alfred Workflows for Developers
1.96k stars 85 forks source link

Make Dash search more intelligent #13

Closed willfarrell closed 11 years ago

willfarrell commented 11 years ago

Have more frequent lookup appear first

Some sample rules might be:

Kapeli commented 11 years ago

Sort by doc view count descending

Dash does this currently. It prioritises the pages that you have previously seen. However, it only prioritises based on this when the results have the same rank in the sort order. For example, if you have previously seen "NSString" and you search for "nss", NSString should be prioritised. However, if you search for "str", NSString won't be prioritised and results that start with str (str*) will be.

Also, Dash provides unique identifiers to Alfred, so Alfred itself should sort previous results based on the ones you have previously actioned.

Sub-sort type

The per-type sorting is not configurable currently. This is because I couldn't think of a way to make it actually useful. The general problem is that if I'd allow per-docset settings, the results would become cluttered and if I'd allow users to edit the global settings, it wouldn't be that useful. If you can think of any way of handling this nicely, let me know!

willfarrell commented 11 years ago

I just updated Dash now, copied over the new workflow file, and did some fine tuned testing. Alfred is auto sorting based on previous actions (didn't know before). However it is only able to do the sort if the item requested is in the list of 25ish displayed.

For example the query php:arra it will not show any array functions due to it not being in the list displayed. Screen Shot 2013-04-25 at 10 27 36 AM

No worries about sub-sort by type, it was just an idea. I had a feeling it would become messy on the backend.