Jump to content

Fallback file search isn't as successful as I'd expect


Recommended Posts

Greetings.

 

Fallback file search works less well for me, than I'd have guessed, and I'm wondering if I have something misconfigured.

 

Two concrete examples on my machine:

 

1. I type 'find mpman' in Alfred's pop-up, hoping to find the file `/usr/local/texlive/2020/texmf-dist/doc/metapost/base/mpman.pdf`, but instead end up with the fallback ‘search Google/Amazon/Wikipedia’.  The path `/usr/local/texlive/2020/texmf-dist/doc` is in the ‘Search scope’; `find /usr/local/texlive/2020/texmf-dist/doc -name mpman\*` does find it successfully (of course); and `mdfind name:mpman` finds it as the first hit.  There are no symlinks in the `/usr/local/...` path (which I wondered might confuse things).

 

2. Picking another example somewhat at random, I can use `'rindler` to find the file `/clouds/.../rindler06`(a plain text file: `file` says `UTF-8 Unicode text`, this tree `/clouds` is indeed in the ‘Search scope’).  That's good, but if I search for keywords which are in this file, I end up at the fallback search, whereas `mdfind` gives me this file early on in its list of hits.

 

In the latter case, I can see that the fact that the file doesn't have an extension might confuse things, and I can see a ‘Text Files’ in the ‘default results’ pane, but I'm not sure what counts as a ‘text file’ for Alfred's purposes, and turning this on and off doesn't seem to change things.  This is where I'm guessing I've got something unticked that should be ticked.

 

More generally, is there a way I can tell Alfred to fallback to Spotlight searches – which `mdfind` seems to suggest are quite successful for me – rather than Google/Amazon/Wikipedia?

 

This is on 10.15, and with Alfred 4.3.2.

 

Thanks for any pointers,

 

Norman

Link to post

Hi @Norman Gray, welcome to the forum.

 

2 hours ago, Norman Gray said:

2. Picking another example somewhat at random, I can use `'rindler` to find the file `/clouds/.../rindler06`(a plain text file: `file` says `UTF-8 Unicode text`, this tree `/clouds` is indeed in the ‘Search scope’).  That's good, but if I search for keywords which are in this file, I end up at the fallback search, whereas `mdfind` gives me this file early on in its list of hits.

 

How are you trying to find the file in this case? The open and find searches only search by file name. You need to use in to search file content.

 

2 hours ago, Norman Gray said:

More generally, is there a way I can tell Alfred to fallback to Spotlight searches – which `mdfind` seems to suggest are quite successful for me – rather than Google/Amazon/Wikipedia?

 

As a rule, you can use ^↩ on any result in Alfred to search for the current query in Spotlight.

Link to post
38 minutes ago, deanishe said:

How are you trying to find the file in this case? The open and find searches only search by file name. You need to use in to search file content.

 

Aha!  The 'in' command has somehow passed me by – some tunnel vision on my part – I realise I've been thinking of 'in' as effectively the default search type.  I can _now_ see it's really quite prominent on the ‘file search’ panel....

 

38 minutes ago, deanishe said:

 

As a rule, you can use ^↩ on any result in Alfred to search for the current query in Spotlight.

 

It seems to be Option-return in my setup (which I don't recall having changed from the defaults), but I've found that, and it works.

 

Thanks x 2!

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...