I bumped into a case where none of the steps in Mac OS X – Spotlight not finding many files: force a rescan solved it helped.
The problem was that my SD card at /Volumes/SanDisk400GB/
was not indexed any more, but the SSD was.
These steps solved it:
$ sudo mdutil -i off /Volumes/SanDisk400GB/ 2019-02-25 16:32:47.097 mdutil[14810:3728038] mdutil disabling Spotlight: /Volumes/SanDisk400GB -> kMDConfigSearchLevelFSSearchOnly Indexing disabled. $ sudo mdutil -i on /Volumes/SanDisk400GB/ /Volumes/SanDisk400GB: Indexing enabled. $ sudo mdutil -E /Volumes/SanDisk400GB/ /Volumes/SanDisk400GB: Indexing enabled. $ sudo mdutil -E / /: Indexing enabled. $ sudo mdutil -p
I am not sure if any of these can be omitted.
An odd thing: sudo mdutil -s
does not show any output on progress. It is too late now, but I suspect it requires a volume
parameter, just like -i
and -E
require.
–jeroen