• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
programmatically tell when spotlight/mds is indexing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

programmatically tell when spotlight/mds is indexing


  • Subject: programmatically tell when spotlight/mds is indexing
  • From: sqwarqDev <email@hidden>
  • Date: Fri, 17 Mar 2017 16:50:07 +0700

I have an app that uses MSMetadataQuery. As expected, this returns very fast results. However, there is an edge case when Spotlight chooses to re-index the whole disk (indicated in Spotlight's GUI by the blue progress bar underneath during a search).

When this happens my app’s search is severely delayed to the point where users think that it’s hung.
Accordingly, I’d like to offer a warning to the user that the search may be lengthy whenever I detect that Spotlight is reindexing the disk. The question is how can this be determined?

mdutil has a status flag, but all this tells us is whether indexing is enabled for a named volume. It does not return anything about Spotlight’s current activity.

Any suggestions?


Best


Phil
@sqwarq
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: programmatically tell when spotlight/mds is indexing
      • From: Jerome Krinock <email@hidden>
  • Prev by Date: Re: NSTableView column sizes
  • Next by Date: Calculating intrinsicContentSize for a NSTextField
  • Previous by thread: Re: NSTableView column sizes
  • Next by thread: Re: programmatically tell when spotlight/mds is indexing
  • Index(es):
    • Date
    • Thread