Spotlight doesn't show applications

With all the deleting of files that spotlight depends on, I would write off that system entirely. Make a good backup - maybe two if you use Time Machine which may not have a good backup due to spotlight and the filesystem likely being suspect or corrupted.

Erase the entire volume and then test spotlight on a clean install. Once you are convinced the hardware is working with none of your old data or system present, you can erase again and migrate back your data or run Migration Assistant and/or migrate back by hand.

In the future, when you suspect a spotlight issue - I would run mddiagnose which dumps all the log files and data needed to determine the state, error, conditions of the spotlight / mds / metadata collection and indexing subsystems as well as system logs that can help show issues.

In most cases where we see this, it's corrupt data (bad spotlight importer crashing) as the system crawls all the data that causes things, so restarting that process doesn't fix the underlying issue. With all you've done, it's going to be very hard to find out the case but you could try working with Apple Support on a mddiagnose analysis or take a stab at reviewing it yourself.


I am not sure whether you have tried this step or not.

Open Terminal window from LaunchPad.

First, turn off Spotlight:

sudo mdutil -a -i off 

Next, unload the metadata file that controls Spotlight’s index:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist 

Use the following command to re-loads the index :

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist'''

As a last step, turn Spotlight back on:

sudo mdutil -a -i on 

After a few minutes to rebuild the index, Spotlight should be functioning as normal.

Let me know how it goes.

Update: I have a script for it and it is helping me in such kinds of issue.

#!/bin/bash
# This script is designed to fix Spotlight indexing issues
# by removing the existing Spotlight index and forcing Spotlight
# to create a new search index.

# Turn Spotlight indexing off

/usr/bin/mdutil -i off /

# Delete the Spotlight folder on the root level of the boot volume

/bin/rm -rf /.Spotlight*

# Turn Spotlight indexing on

/usr/bin/mdutil -i on /

# Force Spotlight re-indexing on the boot volume

/usr/bin/mdutil -E /

Save this as .sh and run from the terminal. It should help you to fix your issue too.