Skip to content

The Eclectic Light Company

Macs & painting – 🦉 No AI content
Main navigation
  • Downloads
  • Freeware
  • M-series Macs
  • Mac Problems
  • Mac articles
  • Macs
  • Art
hoakley November 20, 2025 Macs, Technology

Diagnose Spotlight local search problems

Spotlight local search problems are common, and are all too often tackled blindly by forcing a volume’s indexes to be rebuilt. Although that can sometimes resolve the problem, without knowing its cause, it can just waste time and effort. In some cases rebuilding the indexes can worsen the problem, at least temporarily. This article explains how to use SpotTest and other tools to perform systematic testing and arrive at a diagnosis before hazarding a guess at its treatment.

1. Setting up

Before going any further, check that Spotlight settings are in order, and don’t exclude the volume or folder you’re trying to search, or the document type you’re looking for. In Spotlight settings,

  • check all Results from System are turned on, particularly Files and Folders,
  • click on Search Privacy… and remove any locations you want to include in search.

Then open Activity Monitor and watch its CPU % listing to verify that Spotlight isn’t currently in the process of reindexing or performing other maintenance to its indexes. If it is, delay testing until those have completed. Searching using Spotlight while it’s actively working on its indexes will give odd results, or none at all.

If you’re going to use SpotTest on any location with privacy control, such as your Home Documents folder or an external disk, add the app to the Full Disk Access list in Privacy & Security settings, before opening it.

2. Home folder test

Even if your interest is in a different volume, perform a basic test of a new test folder in your current Home folder, to establish a baseline and confirm that Spotlight is working there.

Open SpotTest and set it to defaults, with a Term of cattle, a Scope of [Home], and both Search Keywords and Search EXIF ticked.

Click the Create Tests tool (the leftmost of the tools) to create the folder of test files at the top level of your Home folder. Make a note of the time to the second that you do this.

About 10 seconds after that, click either the Run NSMetadata test or Run mdfind test tool. You should then see a list of files found, including those in the test folder ~/0_SpotTestFiles, including A, B, C, D, E, F, G, K, L, M.

If you don’t see those listed, open Mints and use the Log Window button in its Spotlight section to obtain a log extract from the time the test files were created, or use LogUI to do the same. You’ll then need to look at that log extract to see if there are clues as to why indexing didn’t take place in that period.

Leave the test folder where it is, and anything from 1 hour to 5 days later, repeat the search using either or both of those tools. Once additional indexing has been undertaken:

  • NSMetadata should now find A, B, C, D, E, F, G, I, K, L, M but not H
  • mdfind should now find A, B, C, D, E, F, G, H, I, K, L, M.

I is found using Live Text, and H by Visual Look Up, the latter only being found by the mdfind search.

These tests have demonstrated:

  • mdworker and mds indexing of files supported by system mdimporters;
  • delayed background mediaanalysisd image analysis and mds indexing of Live Text and Visual Look Up content.

To match test files with their importers, click the Check importers tool. Note that file L doesn’t use a plugin, and N uses a plugin but can’t be found because the search term is inside an image in the PDF document, which currently isn’t recoverable content.

3. Metadata indexing

If that test isn’t fully successful, or you’re uncertain whether indexing is complete, inspect the metadata of the test files. Open a Finder window on the contents of ~/0_SpotTestFiles, set it to Column View, and widen the window to provide a suitable Preview pane within it. Select each of three files in turn and confirm their metadata are shown correctly. To inspect all available metadata, click on any Show More text.

SpotTestC.pdf will have different datestamps, but the seven fields of metadata below those should be identical to those shown above.

SpotTestK.jpg will also have different datestamps, but the five fields below should be identical to those above.

SpotTestM.txt should include a final line of Keywords one, cattle, three.

You can also check all indexed metadata for those files in Terminal using the commands
mdls ~/0_SpotTestFiles/SpotTestC.pdf
mdls ~/0_SpotTestFiles/SpotTestK.jpg
mdls ~/0_SpotTestFiles/SpotTestM.txt

Missing metadata on those three files demonstrates that the test folder hasn’t been indexed correctly. You can try restarting your Mac, leaving it a few minutes to update its Spotlight indexes, then repeating the tests using SpotTest.

4. Custom mdimporter

Many apps come with their own custom mdimporter that provides Spotlight indexing support for document types not supported by macOS. In the past, these were normally installed in /Library/Spotlight, but more recent apps typically keep them inside the app bundle in Library/Spotlight. These can be tested easily.

Create and save one of those custom document types, so that it contains the word cattle in a way that should be searchable by Spotlight. Copy that document to the ~/0_SpotTestFiles folder, wait about 10 seconds, then repeat the test search. You may well notice that NSMetadata search doesn’t find your custom test document, but mdfind does, because of the difference in the search criteria they use.

You should also click the Check importers tool to check that the correct mdimporter was recognised and used for the custom document type.

5. Volume test

If Spotlight works correctly with the test folder in your Home folder, you may wish to progress to testing a different volume or location. Having created its test folder in ~/0_SpotTestFiles, copy that to the other location. Before you change the Scope of the search, click on the 🔄 button to list available volumes, then select the volume containing the copied test folder in the Scope menu.

When you perform the two types of search on that volume, the same rules should apply as to which will be found. Note though that finding files I and H can take much longer, or they may not appear at all.

6. Search term test

When you’re confident that a search term of cattle can be found reliably, you may wish to extend your testing to other terms. Take care when choosing custom terms, as you want to be confident that they should be found, but not in such numbers that the results are overwhelming. You will also need to create your own test files containing the custom term.

Diagnosis

SpotTest can thus provide key information on:

  • Delay or absence of find following creation of test files. If no indexing activity is seen in the log, that indicates indexing failure. If the test files are indexed promptly, it indicates search failure.
  • Delay or absence in finding files H and I, indicating an indexing failure.
  • Failure of a custom mdimporter to index a custom document type.
  • Failure to index another volume.

Those should fit in with the overall scheme used by Spotlight, as shown below.

spotlightsteps1

Happy hunting!

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to email a link to a friend (Opens in new window) Email
  • Click to print (Opens in new window) Print
Like Loading...

Related

Posted in Macs, Technology and tagged diagnosis, mdls, metadata, Spotlight, SpotTest, troubleshooting. Bookmark the permalink.

15Comments

Add yours
  1. 1
    EcleX's avatar
    EcleX on November 20, 2025 at 10:37 am
    Reply

    Thanks for the interesting article. Is it possible to know where is stored the Spotlight index, and its size?

    LikeLiked by 1 person

    • 2
      hoakley's avatar
      hoakley on November 20, 2025 at 12:07 pm
      Reply

      The Spotlight indexes are stored where they always have been, in the hidden .Spotlight-V100 folder at the root level of each volume that Spotlight is indexing. Although you may be able to view that folder’s size in the Finder, in some volumes like the Data volume, you’ll need to use du in Terminal, as the folder is locked away.
      Howard.

      LikeLiked by 2 people

      • 3
        EcleX's avatar
        EcleX on November 21, 2025 at 8:06 am
        Reply

        Thanks. At least in macOS 13.7.8 (22H730) Ventura on Mac (Intel), the root directory does not show such “.Spotlight-V100” folder. But I have found a folder (albeit without the initial dot) at “private/var/db/Spotlight-V100”. I wonder if it is that one. Such folder shows a forbidden sign in Finder and zero bytes. Terminal du command shows:

        du /private/var/db/Spotlight-V100
        du: /private/var/db/Spotlight-V100: Operation not permitted

        LikeLiked by 1 person

        • 4
          hoakley's avatar
          hoakley on November 21, 2025 at 8:15 am

          No, that’s not the Spotlight indexes on the Data volume. For those, you’ll need the path /System/Volumes/Data/.Spotlight-V100 and you’ll need to sudo the du command, as it’s a protected folder.
          If you look at the root / level on the boot volume group, you see what’s stored in the SSV, not the Data volume.
          Howard.

          LikeLike

  2. 5
    EcleX's avatar
    EcleX on November 21, 2025 at 9:23 am
    Reply

    Thanks. I found it in “System/Volumes/Macintosh HD/.Spotlight-V100” (Macintosh HD or whatever name the boot disk has in the Finder). Curiously, selecting such “.Spotlight-V100” in Finder and Option – Edit – Copy “Spotlight-V100” as Pathname copies “/System/Volumes/Data/.Spotlight-V100” (replaces Macintosh HD by Data). Such “.Spotlight-V100” folder shows a forbidden sign in Finder and zero bytes. Terminal sudo du command on such folder shows:

    sudo du /System/Volumes/Data/.Spotlight-V100
    8 /System/Volumes/Data/.Spotlight-V100/Store-V1
    0 /System/Volumes/Data/.Spotlight-V100/Store-V2/encoded number here/journals.health_check
    0 /System/Volumes/Data/.Spotlight-V100/Store-V2/encoded number here/journals.migration_secondchance
    0 /System/Volumes/Data/.Spotlight-V100/Store-V2/encoded number here/journals.assisted_import_pre
    224 /System/Volumes/Data/.Spotlight-V100/Store-V2/encoded number here/Cache/0000/0003/1069
    …/… hundreds of such cache lines here
    5291960 /System/Volumes/Data/.Spotlight-V100/Store-V2/encoded number here/Cache/0000/0000
    74387312 /System/Volumes/Data/.Spotlight-V100/Store-V2/ encoded number here/Cache/0000
    74387312 /System/Volumes/Data/.Spotlight-V100/Store-V2/ encoded number here/Cache
    0 /System/Volumes/Data/.Spotlight-V100/Store-V2/ encoded number here/journals.corespotlight
    0 /System/Volumes/Data/.Spotlight-V100/Store-V2/encoded number here/journals.live_system
    664 /System/Volumes/Data/.Spotlight-V100/Store-V2/encoded number here/journals.scan
    0 /System/Volumes/Data/.Spotlight-V100/Store-V2/ encoded number here/journals.assisted_import_post
    16 /System/Volumes/Data/.Spotlight-V100/Store-V2/encoded number here/journals.live_user
    0 /System/Volumes/Data/.Spotlight-V100/Store-V2/encoded number here/journals.live
    0 /System/Volumes/Data/.Spotlight-V100/Store-V2/encoded number here/journals.migration
    0 /System/Volumes/Data/.Spotlight-V100/Store-V2/encoded number here/journals.repair
    0 /System/Volumes/Data/.Spotlight-V100/Store-V2/encoded number here/journals.live_priority
    109495760 /System/Volumes/Data/.Spotlight-V100/Store-V2/encoded number here
    109495768 /System/Volumes/Data/.Spotlight-V100/Store-V2
    109495792 /System/Volumes/Data/.Spotlight-V100

    But the size of such “.Spotlight-V100” folder is not shown.

    LikeLiked by 1 person

    • 6
      hoakley's avatar
      hoakley on November 21, 2025 at 9:25 am
      Reply

      You’ll need to use the -sh option, as in
      sudo du -sh [path]
      Howard.

      LikeLike

      • 7
        EcleX's avatar
        EcleX on November 21, 2025 at 10:06 am
        Reply

        Wow, wow, wow!!! You are a genius!!! Doing that in Terminal shows the Spotlight index size:

        sudo du -sh /System/Volumes/Data/.Spotlight-V100
        52G /System/Volumes/Data/.Spotlight-V100

        Many thanks again for all. You rock!

        LikeLiked by 1 person

        • 8
          hoakley's avatar
          hoakley on November 21, 2025 at 10:35 am

          You’re most welcome.
          Howard

          LikeLike

  3. 9
    Samual's avatar
    dreamlandfried9f902d8635 on December 7, 2025 at 10:20 pm
    Reply

    Just used SpotTest. Very nice utility and the help file PDF is very helpful! One question. so there is no way to force mediaanalysisd to re-index a given volume… we just have to wait “… several hours or days, it should also be able to find files H and I, following background indexing by mediaanalysisd”

    LikeLiked by 1 person

    • 10
      hoakley's avatar
      hoakley on December 7, 2025 at 10:41 pm
      Reply

      I’m afraid that I don’t know of any. It’s a background process that runs mostly when a Mac is awake but inactive. If your Mac isn’t running and awake 24/7 then it can take a long time to index these.
      Howard.

      LikeLike

  4. 11
    samual's avatar
    samual on December 20, 2025 at 8:22 pm
    Reply

    I believe SpotTest has a permissions issue. If I move the 0_SpotTestFiles folder to my Documents folder (which is under iCloud) and change the Scope to my drive (not my home folder because the folder is no longer there) SpotTest can not find anything in 0_SpotTestFile. I then tried running the mdfind command in terminal. As soon as I executed the command on the 0_SpotTestFiles folder terminal asked for permission (through the UI) to access my Documents folder. Once I allowed that the mdfind command via terminal could find the files. But SpotTest still doesn’t work. Thus I conclude that SpotTest should be asking permission to access certain user files.

    LikeLiked by 1 person

    • 12
      hoakley's avatar
      hoakley on December 20, 2025 at 8:27 pm
      Reply

      Thank you. SpotTest can’t ask for that, but you can give it Full Disk Access if you need to. This isn’t about permissions, but privacy protection (TCC).
      Howard

      LikeLike

      • 13
        samual's avatar
        samual on December 20, 2025 at 8:34 pm
        Reply

        That makes sense. I added it to full disk access and all is well. Maybe add a note about that to the help file? Thanks.

        LikeLiked by 1 person

        • 14
          hoakley's avatar
          hoakley on December 20, 2025 at 9:43 pm

          Thank you – yes, although looking at the Help book, I think there needs to be a more extensive discussion of what is and what is not searchable using Spotlight.
          I intend improving that in the next update.
          Howard.

          LikeLike

    • 15
      hoakley's avatar
      hoakley on December 20, 2025 at 8:32 pm
      Reply

      You may still find that SpotTest can’t search some locations: that’s imposed by macOS on third-party apps, but not on Spotlight itself, or your running mdfind. There’s nothing that can be done about that, I’m afraid.
      Howard

      LikeLike

Leave a reply to samual Cancel reply

Quick Links

  • Free Software Menu
  • System Updates
  • M-series Macs
  • Mac Troubleshooting Summary
  • Mac problem-solving
  • Painting topics
  • Painting
  • Long Reads

Search

Monthly archives

  • December 2025 (75)
  • November 2025 (74)
  • October 2025 (75)
  • September 2025 (78)
  • August 2025 (76)
  • July 2025 (77)
  • June 2025 (74)
  • May 2025 (76)
  • April 2025 (73)
  • March 2025 (78)
  • February 2025 (67)
  • January 2025 (75)
  • December 2024 (74)
  • November 2024 (73)
  • October 2024 (78)
  • September 2024 (77)
  • August 2024 (75)
  • July 2024 (77)
  • June 2024 (71)
  • May 2024 (79)
  • April 2024 (75)
  • March 2024 (81)
  • February 2024 (72)
  • January 2024 (78)
  • December 2023 (79)
  • November 2023 (74)
  • October 2023 (77)
  • September 2023 (77)
  • August 2023 (72)
  • July 2023 (79)
  • June 2023 (73)
  • May 2023 (79)
  • April 2023 (73)
  • March 2023 (76)
  • February 2023 (68)
  • January 2023 (74)
  • December 2022 (74)
  • November 2022 (72)
  • October 2022 (76)
  • September 2022 (72)
  • August 2022 (75)
  • July 2022 (76)
  • June 2022 (73)
  • May 2022 (76)
  • April 2022 (71)
  • March 2022 (77)
  • February 2022 (68)
  • January 2022 (77)
  • December 2021 (75)
  • November 2021 (72)
  • October 2021 (75)
  • September 2021 (76)
  • August 2021 (75)
  • July 2021 (75)
  • June 2021 (71)
  • May 2021 (80)
  • April 2021 (79)
  • March 2021 (77)
  • February 2021 (75)
  • January 2021 (75)
  • December 2020 (77)
  • November 2020 (84)
  • October 2020 (81)
  • September 2020 (79)
  • August 2020 (103)
  • July 2020 (81)
  • June 2020 (78)
  • May 2020 (78)
  • April 2020 (81)
  • March 2020 (86)
  • February 2020 (77)
  • January 2020 (86)
  • December 2019 (82)
  • November 2019 (74)
  • October 2019 (89)
  • September 2019 (80)
  • August 2019 (91)
  • July 2019 (95)
  • June 2019 (88)
  • May 2019 (91)
  • April 2019 (79)
  • March 2019 (78)
  • February 2019 (71)
  • January 2019 (69)
  • December 2018 (79)
  • November 2018 (71)
  • October 2018 (78)
  • September 2018 (76)
  • August 2018 (78)
  • July 2018 (76)
  • June 2018 (77)
  • May 2018 (71)
  • April 2018 (67)
  • March 2018 (73)
  • February 2018 (67)
  • January 2018 (83)
  • December 2017 (94)
  • November 2017 (73)
  • October 2017 (86)
  • September 2017 (92)
  • August 2017 (69)
  • July 2017 (81)
  • June 2017 (76)
  • May 2017 (90)
  • April 2017 (76)
  • March 2017 (79)
  • February 2017 (65)
  • January 2017 (76)
  • December 2016 (75)
  • November 2016 (68)
  • October 2016 (76)
  • September 2016 (78)
  • August 2016 (70)
  • July 2016 (74)
  • June 2016 (66)
  • May 2016 (71)
  • April 2016 (67)
  • March 2016 (71)
  • February 2016 (68)
  • January 2016 (90)
  • December 2015 (96)
  • November 2015 (103)
  • October 2015 (119)
  • September 2015 (115)
  • August 2015 (117)
  • July 2015 (117)
  • June 2015 (105)
  • May 2015 (111)
  • April 2015 (119)
  • March 2015 (69)
  • February 2015 (54)
  • January 2015 (39)

Tags

APFS Apple Apple silicon backup Big Sur Blake Bonnard bug Catalina Consolation Console Corinth Delacroix Disk Utility Doré El Capitan extended attributes Finder firmware Gatekeeper Gérôme High Sierra history of painting iCloud Impressionism landscape LockRattler log M1 Mac Mac history macOS macOS 10.12 macOS 10.13 macOS 10.14 macOS 10.15 macOS 11 macOS 12 macOS 13 macOS 14 macOS 15 malware Metamorphoses Mojave Monet Monterey Moreau myth narrative OS X Ovid painting performance Pissarro Poussin privacy Renoir riddle Rubens Sargent security Sierra SilentKnight Sonoma SSD Swift Time Machine Tintoretto Turner update upgrade Ventura xattr Xcode XProtect

Statistics

  • 21,100,392 hits
Blog at WordPress.com.
Footer navigation
  • Free Software Menu
  • About & Contact
  • Macs
  • Painting
  • Downloads
  • Mac problem-solving
  • Extended attributes (xattrs)
  • Painting topics
  • SilentKnight, Skint, SystHist, silnite, LockRattler & Scrub
  • DelightEd & Podofyllin
  • xattred, SpotTest, Spotcord, Metamer & xattr tools
  • 32-bitCheck & ArchiChect
  • XProCheck, T2M2, LogUI, Ulbow, blowhole and log utilities
  • Cirrus & Bailiff
  • Precize, Alifix, UTIutility, Sparsity, alisma, Taccy, Signet
  • Versatility & Revisionist
  • Text Utilities: Textovert, Nalaprop, Dystextia and others
  • PDF
  • Keychains & Permissions
  • Updates
  • Spundle, Cormorant, Stibium, DropSum, Dintch, Fintch and cintch
  • Long Reads
  • Mac Troubleshooting Summary
  • M-series Macs
  • Mints: a multifunction utility
  • VisualLookUpTest
  • Virtualisation on Apple silicon
  • System Updates
  • Saturday Mac Riddles
  • Last Week on My Mac
  • sysctl information
Secondary navigation
  • Search

Post navigation

The Dutch Golden Age: Winter
The 400th anniversary of the birth of Paulus Potter

Begin typing your search above and press return to search. Press Esc to cancel.

  • Comment
  • Reblog
  • Subscribe Subscribed
    • The Eclectic Light Company
    • Join 8,892 other subscribers
    • Already have a WordPress.com account? Log in now.
    • The Eclectic Light Company
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • View post in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...
 

    %d