Finder (Spotlight) finds some XML files yet misses others in same directory
I have reindexed Spotlight per steps at https://support.apple.com/en-us/HT201716, but it didn't help.
I have several dirs, each with a few thousand ASCII XML files. Since upgrading to Mohave, I started noticing it wasn't finding some content in some files I know was there.
So I ran a test using two directories, dir A with 306 XML files and dir B with 3894 XML files. Dir content has not changed in past few weeks. My Finder preference is set to search only current dir, so in Finder I open the dir and type "version" (without quotes) into the finder search window. All of the XML files contain the word "version" as the first line as verified by running: grep -l "version" * | wc -l. This is the first line of every file:
<?xml version="1.0" encoding="UTF-8"?>
In dir A, Finder finds no files; it should find 306
In dir B, Finder only finds about 10% of the files; it should find 3894
What could be causing this? No idea if it's related to being an XML file or not.