Jump to content

Search Scopes: How do they work in Alfred?


Recommended Posts

I'm a bit confused about how Alfred searches through my folders/files. In attempt to really understand what is being searched when I use "open" or " ' " when invoking Alfred, I removed ALL the folders in the Alfred search scope entirely. I even unchecked "Include Folders in Home." I'm now in the middle of re-indexing spotlight index just to really get a fresh index going. 

 

The problem is, when I invoke file searching, I'm still getting search results. Shouldn't I have entirely removed the scope altogether? Where is it searching? My first thought was it was searching through spotlight's index. If so; since it's already using spotlight and looking through my home folder, why even include the check box to "include home folder" in the Alfred options? 

 

This all started because I was trying to search for a file inside of a google drive folder; and it wasn't working. 

2017-08-30_10-04-36.png

2017-08-30_10-04-36 (1).png

Edited by flome
Added images.
Link to comment

Update: I was successfully able to remove all categories from spotlight by re-installing XCODE and siabling "Developer" from the spotlight categories. Which was the last one checked. Now spotlight shows nothing. As a consequence, Alfred now only shows Applications (which cannot be disabled).

 

Update 2: I spoke too soon. Alfred is still showing me results from ~. Even though spotlight has zero results.

 

image.png.0528646b6fd040204a4904ce45eae1ea.png

 

I just disabled spotlight indexing for all files and rebuilt the index. I'm still getting results there too. Essentially, I'm trying to avoid spotlight and thus Alfred from finding files like below. I don't care about application generated files; they just clutter up my results. 

 

 image.png.bbe68190720408cab1e10a2024866935.png

 

 image.png.fb57447513fdf1fe34011b9e93ce3f1d.png

Edited by flome
Link to comment

You've misunderstood a couple of things.

 

Spotlight's Search Results tab configures exactly that: Spotlight's (not Alfred's) search results. It doesn't affect what is actually indexed. If you don't want a certain folder to be indexed at all, add it to the Privacy tab. That will also prevent its contents from showing up in Alfred and any other applications that use the system index. Since many (most?) applications that have a search function use the system's indexing API to search their own data, you should be careful what you add here, e.g. if you add ~/Library, you're going to break the search function in a lot of applications.

 

Adjusting the scope and file types in Alfred Preferences only affects Alfred's default search (i.e. without a keyword). Using find or open searches the entire index regardless of what you've configured in Alfred Preferences.

 

The best way to use Alfred is to keep the default search restricted to relatively few folders and filetypes, and create additional, fairly-specific searches using File Filters. For example, you might create a search for only one folder or for only Excel files. That keeps searches fast and results relevant.

 

find and open are sort of "fallbacks", as they use the entire index, which as you've noticed, contains a lot of stuff you're not interested in.

Edited by deanishe
Link to comment
8 minutes ago, deanishe said:

You've misunderstood a couple of things.

 

Im starting to understand a little better now, thanks.

 

1. Any way to restrict applications results specifically to the "Applications" folder in my home root? I'd rather not see other apps in the system if they aren't located in that folder. See below

 

image.thumb.png.658c04aff10f327dab53abbeb90a0753.png

Link to comment

Got it. One last question. 
 

Why is it that I can't find any of the files listed in the /Volumes/GDrive folders I added above? Those folders contain bookmarks, video files, etc.. Things I've enabled in the file search, but they're just not coming up...

Link to comment

Judging by the name, that isn't a native macOS volume (HDD formatted with HFS+ or an AFP-mounted share). AFAIK, they're the only types of volumes that macOS indexes.

 

Does Spotlight find anything on that volume?

 

If not, you might be able to enable indexing via Terminal with mdutil -i on "/Volumes/GDrive - JayRay"

Edited by deanishe
Link to comment
23 minutes ago, deanishe said:

that isn't a native macOS volume (HDD formatted with HFS+ or an AFP-mounted share). AFAIK, they're the only types of volumes that macOS indexes.

 

Spotlight doesn't, no. It's an ExpanDrive mounted drive so I'm unsure of how it's mounted. I swear I got it to work at one point and now I can't seem to get it to work again. Perplexing.

Link to comment

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...