Troubleshooting File Indexing Issues
If Alfred can't find the files or applications you're looking for, take a look at these steps to troubleshoot the issue.
Note: If you've upgraded to macOS 12 Monterey, please ensure that you're using Alfred 4.6.1+ and that Monterey is also up to date.
Take a look at the Monterey-specific troubleshooting instructions if Alfred can't find files or apps in macOS 12 Monterey.
The built-in file troubleshooter can be run from Alfred's Preferences:
Help > Troubleshooting > File Search Troubleshooting > Run Troubleshooting
Click the "Run Troubleshooting" button and drop the file which cannot be found from Finder into the troubleshooting sheet, and Alfred will attempt to diagnose the file search issue.
If the troubleshooting passed, try using Alfred's file search mode.
If the Built-in Troubleshooting tool has highlighted indexing issues, or you're experiencing any indexing issues on your Mac, these steps will guide you in resolving them.
1. Use the "find", "open", and "in" keywords
Alfred uses an intelligent search scope to be fast and efficient. The results included in Alfred's default results include applications, contacts and other file types you've specified in your Default Results preferences.
You can expand your search by prefixing your search with these keywords:
- "open" (or a quick press of the spacebar as a shortcut) to launch the file/app you're searching for
- "find" to reveal it in Finder
- "in" to search inside files
2. Set the Search Scope correctly
Alfred searches for files within his defined search scope. To review your settings, go to Preferences > Features > Default Results.
Ensure the file you're searching for is located within your search scope. You can drag in additional folders if your files are stored outside of the existing scope.
To keep Alfred's results clean, we recommend use use the spacebar prefix (as in step 1) to search for files but if you're searching for types you want to include in default results (without a keyword or spacebar prefix), ensure these are checked in the Essentials or Extras.
If your search scope is correct, move on to the next step.
3. Check your Spotlight settings
Launch your System Preferences to the Spotlight preference pane to ensure all checkboxes for the file types you want to search are selected. Spotlight allows you to choose which file types are indexed by macOS. As Alfred relies on the same metadata, it's essential that the boxes are checked for all file types you want Alfred to find.
4. Check the Spotlight Privacy tab
In System Preferences > Spotlight > check the Privacy tab, and ensure that it doesn't contain files or folders you want to index, as anything contained here will not be included in the macOS metadata index.
5. Rebuild your Mac's metadata index
This step is a low-level but safe process to fix the macOS metadata which Alfred uses on your Mac. It uses an official macOS terminal command provided by Apple.
There are a number of steps involved, and every step should be followed very closely.
It's possible for the metadata gathered by macOS to become corrupted or be missing some files, which means Alfred won't return the results you expect.
This can sometimes be obvious because Spotlight won't show any results either, but in some cases, Spotlight may still be showing old cached data. Rebuilding the index will allow macOS to reindex all files, refreshing the results it provides you.
You should rebuild your Mac's index even if Spotlight appears to be showing the right results.
How to rebuild your Mac's index:
- First, open System Preferences > Security & Privacy > Privacy > Full Disk Access and add Terminal, checking the box next to it. (See full instructions on adding Terminal to Full Disk Access)
- Go to the Advanced tab in Alfred's Preferences and click "Rebuild macOS Metadata".
- Check the "Delete .Spotlight-V100 before reindex" box, ensuring the reindex is as thorough as possible.
- Once Terminal appears, you'll need to type your password; Characters won't appear as you type, so just keep typing and press
Return. The required password is the admin password on your Mac, which is likely the same password as your user account.
Before continuing, step 1 and 3 above are non-optional if you've upgraded to macOS Monterey. If you have skipped these steps, the reindexing will not work.
Be sure to read step 4 above regarding entering your Password.
Keep a close eye for any error messages relating to your index. Indexing can take up to an hour on older Macs, during which time Spotlight and Alfred's search results may be incomplete, so time for a cup of tea?
You should see the message "Indexing enabled" after typing your password. If you see the message "Spotlight server is disabled" or a similar message, you'll need to re-enable indexing on your Mac. Contact us from your Powerpack email address if you're not sure how to re-enable it.
You can check indexing progress by opening Spotlight and typing a few characters; If the process is still going, you'll see a progress bar.
Once macOS has finished reindexing, type "reload" into Alfred to refresh his cache of your Applications.
If you notice that Alfred appears to find an application that Spotlight doesn't see, this can be because Alfred has previously cached the application. Typing "reload" into Alfred will refresh the cache so the app will disappear. You'll then need to perform the indexing step above.
6. Reload the Applications cache
If you are looking for an Application, it's possible that your application cache has somehow become outdated. Type the word "reload" in your Alfred window to refresh your app cache.
7. Check the name of the file you're searching for
Ensure that the name of the file you're searching for is accurate, as you may be searching for a file name that doesn't exist. Consider using the * (star) character as a wildcard if you only know part of the word you're searching.
Still having issues?
If you're still unable to find files on your Mac, get in touch and give as much detail as you can on your situation and the steps you've taken.
- Diagnostics file: If you're using Alfred 4, type
?diagnosticsinto Alfred and attach the resulting file to your email.
- File Troubleshooting output: Please copy the full output of more than one file troubleshooting you've run, with any errors you saw
Further useful information:
- What file are you searching for, where is it located on your Mac and what file type is it?
- What are you typing into Alfred when searching for this file?
- Can Spotlight find the file, or can neither Spotlight or Alfred find it?
- Are you struggling to find a single file or many?
The more information you provide, and the more thoroughly you answer questions, the easier it'll be to resolve your issue! :)