How do I determine that mdworker
(Spotlight) has completed its first scan? I'm basically looking for the point at which the little "." in the spotlight search icon would go away and you'd be able to perform searches. (Obviously the OS has a way to determine this since it displays a dot until it's ready...) I'm not seeing anything from mdutil
and I can't find anything in the Spotlight APIs.
I'm currently forcing my own scan synchronously using mdimport
, but this introduces a long delay (from minutes to hours depending on how aggressive I'm being about where to search) and duplicates work that mdworker
is already doing.
Any solution (programmatic, scripted, documented, or undocumented) is fair game here.