Monday 23 November 2020

Tinkering with Spotlight disk indexing in macOS 11 Big Sur

 Having upgraded to Big Sur last week, I'd noticed that Spotlight still hadn't completed disk indexing after ~7 days.

I was digging in further using Terminal: -

sudo mdutil -E /

/:
Error: Index is already changing state.  Please try again in a moment.

sudo mdutil -i on /

Password:
/:
Indexing enabled. 


sudo mdutil -i off /

/:
Error: Index is already changing state.  Please try again in a moment.

sudo mdutil -s /

/:
Error: unexpected indexing state.  kMDConfigSearchLevelTransitioning

None of this looked particularly good ....

Thankfully, a colleague showed me how to turn indexing off: -

sudo mdutil -a -i off

/:
2020-11-23 11:12:08.988 mdutil[75847:1674629] mdutil disabling Spotlight: / -> kMDConfigSearchLevelFSSearchOnly
Indexing disabled.
/System/Volumes/Data:
2020-11-23 11:12:09.061 mdutil[75847:1674629] mdutil disabling Spotlight: /System/Volumes/Data -> kMDConfigSearchLevelFSSearchOnly
Indexing disabled.
/Volumes/Backups of Dave’s MacBook Pro:
2020-11-23 11:12:10.963 mdutil[75847:1674629] mdutil disabling Spotlight: /Volumes/Backups of Dave’s MacBook Pro -> kMDConfigSearchLevelFSSearchOnly
Indexing enabled. 

and on again: -

sudo mdutil -a -i on

/:
Indexing enabled. 
/System/Volumes/Data:
Indexing enabled. 
/Volumes/Backups of Dave’s MacBook Pro:
Indexing enabled. 

and, now, things are looking better ....

sudo mdutil -s /

Password:
/:
Indexing enabled. 

Spotlight is still eating battery : -



but .... we'll see ....


No comments:

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...