Skip Kelly wrote:
As an example, let's say I have a folder named "Project" full of files named "audio.mp3" and variations of that like "audio_42.mp3". If I do a search of the folder for anything named "audio" I get zero results even though I'm looking right at the files.
I go into Settings>Siri & Spotlight>Spotlight Privacy, add then remove the "Project" folder and shortly thereafter my search is functional again.
The problem is only ocurring on my external SSD.
There are some unusual things there. First of all, the default search is a keyword search, not a file name search. You have to wait half a second and wait for the search options menu to appear before you can do a file name search. Can you confirm you are actually doing a file name search?
Next, the default search is a full search of the entire computer. You have to have a Finder window open on the folder you want to search. Then, you have to search the entire computer. There's no way to avoid this. The search starts immediately. You have to manually click on the Folder name in the search options toolbar. Can you confirm you are actually changing the search folder? And, if so, what happens if you don't change the search folder?
Does the problem occur with only one specific folder? Does the problem occur with only one specific kind of file? What happens if you create an "audio_42.txt" file in that folder? Is it immune to these problems? Do you have any apps anywhere on this external disk?
How is this external disk formatted? Do you have ownership enabled on the disk?
A common myth about Spotlight involves the indexing. People see a problem, rebuild the index, and then the problem returns. They assume there must be some problem with the index. But Spotlight actually doesn't work that way. The problem is not the index, but the indexing software. Much of the indexing software is actually 3rd party apps. So if there is some 3rd party app with an indexing problem, that will show up as a Spotlight problem. Any app on any visible hard drive will be used for indexing. If you have multiple apps that handle the same file format, it is undetermined which one will be used.
My speculation in your case is that you have some old 3rd party audio app on this external disk. Your audio index is fine. But when you connect the disk, that old app takes over indexing and promptly reindexes the disk, breaking the index. When you force rebuild the index, some Apple app takes over because the 3rd party app crashed during its index. This continues until the next time you insert the disk. Of course, this is just speculation. But my point is that it is 3rd party software that may be doing the indexing. Maybe review Console.app and look for crash reports from between the time the index was working and when it stopped working. You might find the culprit there. Simply rebuilding indexes forever isn't ever going to fix it.