Fixing Evernote and Spotlight indexing

For the longest time I have been wanting to use Evernote to store my notes. But one major issue has been preventing me from doing that every time I tried to switch from a bundle of markdown files to Evernote: the fact that Spotlight search in Evernote notes didn't work.

There are many comments and suggestions out there but I finally found a solution that worked for me:

  1. Open Terminal and do a 'mdimport -L'. This should show all the current Spotlight indexers. You should have only one indexer for Evernote. And that should be the one residing in the application bundle. In my case, there were two: one in the application and one in /Library/Spotlight.
  2. If you have more than one Evernote indexer, delete all except the one in the application bundle.
  3. Find the folder with the notes for indexing. It will be something like /Users/<username>/Library/CoreData/com.evernote.Evernote/<long GUID>/ENNote/_records
  4. In Terminal do a 'mdimport /Users/username/Library/CoreData/com.evernote.Evernote/826044BE-3A77-499D-88AE-3252A38EAB44/ENNote/_records' (using the correct path, of course).
  5. This should return no errors
  6. Now try a Spotlight search. In my case, everything worked now!

I am using Evernote version "6.1.1 (452253 Direct)" (direct download, not the App Store version) and Mac OS X Yosemite (10.10.5).

6 comments on "Fixing Evernote and Spotlight indexing"
Kevin says:

Thanks! Tried several other fixes to no avail. Glad I found your post!

Onur Y. says:

Wow. Thank you Sir! Worked like a charm.

Adam says:

I saw the following error after mdiimport with my Notes path:

} ... returned error Error Domain=NSCocoaErrorDomain Code=260 "The file couldn’t be opened because it doesn’t exist." with userInfo dictionary {
CoreData: error: -addPersistentStoreWithType:SQLite configuration:(null) URL:file:///Users/USER/Library/Containers/com.evernote.Evernote/Data/Library/Application%20Support/com.evernote.Evernote/accounts/ options:{

Jens Willy Johannsen says:

@Adam: Suddenly I ran into that too.

It looks like the importer is looking for a file named "LocalNoteStore.sqlite" in the .../[accountnumber] directory when, in fact, the file is located in .../[accountnumber]/localNoteStore/localNoteStore.sqlite.

I simply added a symbolic link from the existing file to where the importer expects to find it:

$ cd ~/Library/Application Support/com.evernote.Evernote/accounts/[accountnumber]
$ ln -s LocalNoteStore/LocalNoteStore.sqlite LocalNoteStore.sqlite

And then I ran the above mdimport command. And evern though I got an error about "... CocoaLumberjack being ignored in restricted program becaues of @executable_path", it still seems to work...

It would be nice if the prople at Evernote would focus on fixing this...

Jens Willy Johannsen says:

And they broke it again... I'm not sure when, but I'm running Evernote Version 7.8 (457453 Direct) and macOS Mojave version 10.14.2.

Nothing gets indexed and trying to manually reindex returns an error with "code signature in (/.../EvernoteSpotlightImporter) not valid for use in process using Library Validation: mapping process is a platform binary, but mapped file is not..."

Various posts seem to indicate that Evernote is aware of the bug and are "working on a fix that should be in an upcoming release, however there’s not an estimated date on when it will be available".

Evernote, you make it difficult to love you...

Max says:

Hi Jens Willy - thanks for that. Your solution at the top worked for me (after I'd done a evernote spotlight reindex (from the option + help menu) - which may or may not have been necessary). Evernote 7.13 (458080 Direct)

Leave a Reply