1

I have a lot of new files and the CPU is quite busy. When I just add a new file, the command mdfind won't find it immediately. I have to wait for some time (definitely longer than the time needed to index the file as the file is small.)

Once the file is successfully indexed, then I move the file out of the current directly, mdfind -only . still find the moved file but the path printed in the output is outside of .. So the spotlight index is not updated completely.

Is there a way to force the index to be updated immediately as least for certain user specified files and directories? Thanks.

  • What Mac model, what MacOS? I haven't tested it, but my experience of Spotlight is that it is pretty fast. Are you on a hard drive? – benwiggy Feb 20 at 20:05
  • I don't think the model matters. The problem may be that I have a lot of new files somewhere else and/or the CPU is occupied with many jobs. So that it may not have enough time to index the file that I want to index immediately. I need a way to specify specific files to index immediately in the foreground, instead of waiting for the backgroun indexer finish the index. – user1424739 Feb 21 at 3:43
  • The age and type of storage hardware may well be relevant in my consideration of how to help you with your problem. – benwiggy Feb 21 at 9:23
  • Mojave. Macbook air (13-in,2017) – user1424739 Feb 21 at 18:48
1

Something is messed up. Other than when your system has no index, spotlight indexes as the file is written - literally its part of the process writing the data.

The only exception I’m aware of is you can purge spotlight or have a new install and the system queues an index of all files. My recollection is that index only lags for files that were on the drive and new files are indexed immediately.

I don’t thing there’s a setting to change this so instead of wondering how to speed it up, run mddiagnose and work with support to see why your system isn’t caught up. (Or dig in to the diagnostics to see if you can spot the issue(s))

|improve this answer|||||
  • mddiagnose will send the info automatically? I see that it will send personal info to apple. I am a little scared about. Is there a way to check mddiagnose output myself? – user1424739 Feb 21 at 5:52

You must log in to answer this question.

Not the answer you're looking for?Browse other questions tagged .