Contents
Basics
- (Tips for use in /is/search/spotlight/tips)
- support.apple.com/guide/mac-help/search-with-spotlight-mchlp1008/mac
Components | Spotlight, by Apple | Other |
Backend (database, tools) |
|
|
Frontend (search, present) |
|
|
Frontend alternatives |
|
- en.wikipedia.org/wiki/Spotlight_(Apple)
- google.com/search?q=apple+spotlight
- google.com/search?q=backend+frontend+macos+spotlight
- Spotlight: Don’t take your Mac’s powerful search engine for granted
macworld.com/article/232650/spotlight-dont-take-your-macs-powerful-search-engine-for-granted.html- “Spotlight is a powerful database of files, but Apple’s attention to the Spotlight interface is, er, spotty. If you really want to take control of your file searching on macOS, it’s worth considering the $34 utility HoudahSpot, recently updated to version 5.0. ” (Apr 9, 2019)
- google.com/search?q=macos+desktop+search+engines
- The 5 Best Spotlight Alternatives for Searching Mac Files and More, Jan 25, 2022
makeuseof.com/tag/spotlight-alternatives-mac-search/- Alfred
- Find Any File
- Raycast
- LaunchBar
- LaunchBar
- admin-magazine.com/Archive/2021/66/Three-full-text-desktop-search-engines
- Tracker
- “Tracker essentially comprises two parts: a SPARQL database built around SQLite and what are known as “tracker miners.” The SPARQL graph-based query language was defined by the World Wide Web Consortium (W3C) and has been available as a stable version since March 2013 [7]. The tracker miners, which are implemented as classic daemons, browse specified file paths and prepare the data found for indexing.”
- DocFetcher
- “DocFetcher is available for Linux, Windows, and macOS and comes in two variants: the non-commercial DocFetcher and DocFetcher Pro (a test version of which was released in January 2021), which has undergone a complete overhaul compared with the non-commercial version. “
- Recoll
- “Versions of Recoll are available for Linux, a number of Unix variants, Android, Windows, macOS, and even OS/2. Its high performance as a versatile desktop tool comes from the use of the Xapian [12] search engine, which does the real heavy lifting in the background. Xapian’s feature list is endless, and Recoll implements most of it.”
- Tracker
Infos
- Tracker: https://gnome.pages.gitlab.gnome.org/tracker/
- DocFetcher: https://sourceforge.net/projects/docfetcher/
- Recoll: https://www.lesbonscomptes.com/recoll/
- Solr: https://solr.apache.org
- Regain: http://regain.sourceforge.net
- “Tracker 3.0: Where do we go from here?” by Sam Thursfield: https://samthursfield.wordpress.com/2020/11/05/tracker-3-0-where-do-we-go-from-here/
- SPARQL 1.1 Overview: https://www.w3.org/TR/sparql11-overview/
- Tracker CLI documentation: https://gnome.pages.gitlab.gnome.org/tracker/docs/commandline/
- Nepomuk: https://nepomuk.semanticdesktop.org
- Tracker Ontology Reference Manual: https://developer-old.gnome.org/ontology/stable/
- DocFetcher Pro: https://docfetcherpro.com/features/
- Xapian: https://xapian.org
- slashdot.org/software/desktop-search/mac/
- TextSeek (Mac & Win),
- SmartFinder, slashdot.org/software/p/SmartFinder/
- Searchable,
- DocFetcher Pro,
- Launchy,
- QuikFynd (Win-only, as far as can tell…),
- SeekFast (Win-only)
- Alfred (Mac)
- Apple Spotlight
- SSuite Desktop Search
- dtSearch (Win-only)
Command Line, man pages, …
mds
Command
MDS(8) System Manager's Manual MDS(8) NAME mds – metadata server SYNOPSIS mds DESCRIPTION mds is the metadata server. It serves all clients of the metadata APIs, including Spotlight. There are no configurations to mds, and users should not run mds manually. SEE ALSO mdfind(1), mdls(1), mdutil(1) Mac OS X January 19, 2006 Mac OS
mdfind
Command
Extract from man page: mdfind(1) General Commands Manual mdfind(1) NAME mdfind – finds files matching a given query SYNOPSIS mdfind [-live] [-count] [-onlyin directory] [-name fileName] query DESCRIPTION The mdfind command consults the central metadata store and returns a list of files that match the given metadata query. The query can be a string or a query expression. The following options are available: ...
- google.com/search?q=using+mdfind
mdfind 'search!'
Command-
macos:~ joe mdfind kind:folder -name 'search!' 2023-05-16 18:06:12.227 mdfind[55946:6186246] [UserQueryParser] Loading keywords and predicates for locale "en_US" 2023-05-16 18:06:12.227 mdfind[55946:6186246] [UserQueryParser] Loading keywords and predicates for locale "en" /Users/joe/Library/CloudStorage/Dropbox/Research!/IT/Apps! Applications! macOS/Desktop search! /Users/joe/Library/CloudStorage/Dropbox/Research!/IT/Search!! Finding stuff /Users/joe/Library/CloudStorage/Dropbox/Research!/IT/Search!! Finding stuff/Search! different types of search implementations terms autocomplete contextual macos:~ joe$
-
- …
mdls
Command
Extract from man page:
MDLS(1) General Commands Manual MDLS(1) NAME mdls – lists the metadata attributes for the specified file SYNOPSIS mdls [-name attributeName] [-raw [-nullMarker markerString]] file ... DESCRIPTION The mdls command prints the values of all the metadata attributes associated with the files provided as an argument. The following options are available: ...
mdutil
Command
Extract from man page:
mdutil(1) General Commands Manual mdutil(1) NAME mdutil – manage the metadata stores used by Spotlight SYNOPSIS mdutil [-pEsav] [-i on | off] mountPoint ... DESCRIPTION The mdutil command is useful for managing the metadata stores for mounted volumes. The following options are available: ...
mdimport
Command
Extract from man page:
mdimport(1) General Commands Manual mdimport(1) NAME mdimport – import file hierarchies into the metadata datastore. SYNOPSIS mdimport [-itpAXLr] [-d level] [-o -outputfile] [ file | directory ... ] DESCRIPTION mdimport is used to test Spotlight plug-ins, list the installed plug-ins and schema, and re-index files handled by a plug-in when a new plug-in is installed. The following options are available: ...
Problems Research
- google.com/search?q=spotlight+search+not+working
- google.com/search?q=spotlight+search+front+end+not+working
- switchingtomac.com/macos/spotlight-search-not-working-on-mac-try-these-9-fixes/
- Restart Spotlight-Related Services
- SystemUIServer
- Spotlight
- mds
- Restart Your Mac
- Check Your Keyboard Shortcuts
- Check Your Spotlight Settings
- Update Your Mac
- Check for Disk Errors
- Reindex Spotlight Search
- Disable and Reactivate Spotlight Index
- Clear the Mac’s Cache
- SystemUIServer
- Spotlight
- /System/Library/CoreServices/Spotlight.app
- google.com/search?q=%2FSystem%2FLibrary%2FCoreServices%2FSpotlight.app
- mds
The Problems: Spotlight won’t work
There are several incarnations of Spotlight problems that I have personally run into, they are:
- Problem #1) Spotlight menu icon highlights, but no search form appears
- Problem #2) Spotlight search form appears, but no results are shown
- Problem #3) Spotlight search works, but results are poor and incomplete
While not entirely sure what causes any of these problems, try these troubleshooting methods that frequently work to repair Spotlight:
The Solutions: Troubleshooting Spotlight
Solution #1: Kill SystemUIServer
- Launch ‘Activity Monitor’ (located in /Applications/Utilities/)
- Locate the process ‘SystemUIServer’, highlight it, and click the red button “Quit Process”
- Within a few seconds the menubar will rebuild itself and often Spotlight will magically work
Solution #2: Rebuild the Spotlight Index manually
- Launch ‘Terminal’ (located in /Applications/Utilities/)
- At the command prompt, type this exactly:
sudo mdutil -E /
- You will be asked for your password, provide it, as this command requires administrator privelages to run
- You will receive a confirmation message saying that index will be rebuilt
- Wait until index is finished rebuilding, this can take a while depending on the size of your hard drive, amount of files, etc.
- Note: You can also rebuild the Spotlight index with MainMenu, mentioned in Solution #4
Solution #3: Change Desktop Resolution
- This is a strange fix but it works everytime for me when my Spotlight menu icon highlights but the search form doesn’t appear
- Open “System Preferences” via the Apple Menu
- Click ‘Displays’ and select a resolution smaller than what you are currently using, 640×480 seems to always work
- Select your native resolution again, changing your screen resolution back to normal
- The Spotlight search tray will magically become available again
Solution #4: Clear caches and preferences
- Clear caches and preferences relating to Spotlight, this is best done through either the free tool OnyX, or the free tool MainMenu, we recommend MainMenu because it’s easier for novices
- Install MainMenu
- a little Hammer and Wrench icon will appear in your menubar
- navigate down to ‘Cleaning’ and clean out User Cache, System Cache, and Font Caches
- Note: Some users discover that just cleaning the Font caches is adequate to repair a screwy Spotlight, but it won’t hurt to clear them all
Solution #5: Reboot your Mac
- This should almost be listed as #1 just because sometimes a simple reboot will fix Spotlight, but if I can avoid a reboot I will, and often, a reboot isn’t good enough
What do MDS and MDWorker have to do with Spotlight?
The MDS process and mdworker processes usually run concurrently on your Mac when Spotlight is indexing your Mac. Let the processes finish running to complete a relevant search index of your Mac filesystem.
Hopefully that covers it, and Spotlight should be working good as new again. If we missed something, feel free to contribute in the comments below.
Happy Spotlighting!