OS X: Manually index a drive with Spotlight

By default, Spotlight indexes local drives. However it is possible to force it to index networked AFP (Apple File Protocol) volumes as well.

Open Terminal, and type


sudo bash

It will ask for your password.

Then at the bash prompt, enter

mdutil /Volumes/AFPvolumename -i on
mdutil /Volumes/AFPvolumename -s

(replace AFP volumename with the name of the drive you want to index.

Many thanks to sowattmusic for this tip.