Spotlight not finding text in DT files

I’m using DT 3.7.2 in Big Sur 11.4. My databases are in my ~Home directory. I have checked Create Spotlight Index in Database Properties. I have even Rebuilt the Index. Still, when I enter a search string from a DT document, it usually doesn’t show up in Spotlight. Sometimes, but most of the time, no.

If I use DT’s search function, it finds these files easily. But for some reason Spotlight doesn’t.

Am I doing something wrong?

If your files are rtf, you might gain some insight from an article Howard Oakley wrote:

[How to restore Spotlight search of Rich Text files – The Eclectic Light Company]

Thank you for that, and yes, it was .rtf files that didn’t show up in Spotlight. So I did as Howard suggested, and re-indexed Spotlight. That solved the problem for all but one of my DT databases. I re-built the index for that database, and still no joy.

DT’s search function will fund text in that database, but Spotlight just won’t.

Where is the database located - the file path on the machine?

Him Jim. It’s located with all the others: ~/DevonThinkDatabases/BB.dtBase2

The odd thing is that some search-strings show up in Spotlight, and some don’t, even in the same docs. This happens to .pdf’s as well as .rtf’s. It’s quite inconsistent. But all search-strings show up in DT’s own search function. It’s just Spotlight that’s spotty with this database.

Were you previously running DEVONthink 2.x on the machine?

I ran DT2 on my previous computer. I bought this one in January of 2020, a few months after I’d already switched to DT3. I created this database in March of 2020, so it would have been a virgin DT3 creation.

Have you done a File > Verify & Repair on the database?

I did (a few times). According the Activity Window it took a split second and was done.

But the problem persists.

I’ve also done File/Rebuild Database, and that didn’t solve it either.

I’m going to try copying some of the folders from this database into other databases to see if the search strings show up when they’re somewhere else.

Okay Jim, just did some testing in 2 different databases. I created in each a new Plain Text note, a new Rich Text Note and a new Formatted Note.

Then I entered the same unique text-string into each. Just a nonsense word that I knew wouldn’t show up anywhere else.

Entered it into Spotlight, and it immediately was found - in only the Formatted Notes. DT’s Search found it in all three formats in both databases, but Spotlight did not find the Plain Text or Rich Text notes.

Am I doing something wrong, or is this an anomaly?

One more wrinkle here.

As I said in the previous note, Spotlight found only the unique search-string in only the Formatted Note, not in the Rich Text or Plain Text.

But when I enter that search strong in the Finder’s search field, it returns all three! So is this a Spotlight anomaly?

And, interestingly, using Alfred to search ends all the notes that Spotlight doesn’t find. Although it lists their location by ~Library/Metadata/com.devon-technologies.think/ (etc)

It might be useful to use the Alfred Metadata Tool to compare the metadata of the three files to see if there is anything anomalous about the rich text and/or plain text metadata (compared to that of the formatted note).

Sorry if it doesn’t help: it was just an idea!


1 Like