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).

4 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...

Leave a Reply