14

I am using my notes app on OSX 10.11.5 and iOS 8. For the most part, things are working, but I am noticing that many of my older notes are not searchable. When I type something in the search box, these older notes do not appear in search results even if there is a match. However, if I edit a note or create a new one, it is fully searchable.

My guess is that somehow the search indexes for my notes got corrupted. Is there any way to fix this or rebuild the indexes?

  • Do you have your notes stored locally or on the internet? (iCloud, gmail...) Or maybe they are spread around different places? – Pierobon Jun 3 '16 at 17:12
  • iCloud. Turns out that on my iPhone, the notes show up, so I thought that it would have been a spotlight issue, but when I tried the suggestion below, the search was not fixed. – Andrew Eisenberg Jun 3 '16 at 19:30
7
+50

If your notes are in iCloud, make a local backup. Then in iCloud settings uncheck Notes. Your Notes will all be removed. Now turn Notes back on. They should all return and this force an index rebuild.

| improve this answer | |
  • Thanks for the idea. Backing up my notes now and seeing if this will work. – Andrew Eisenberg Jun 5 '16 at 21:44
  • 1
    Yep. That did the trick! – Andrew Eisenberg Jun 5 '16 at 22:54
  • I tried this, and also the suggestion below (13 upvotes). Nothing works for me. :( – Ugur Jun 30 at 20:22
13

Much quicker way of fixing this is just to make a new iCloud notes folder, move all your notes into that and back again. This seems to rebuild the index- you can then get rid of the new folder. This is useful if like me you don't have a quick option to back up your notes separately.

| improve this answer | |
  • 2
    Worked beautifully. Very simple and elegant solution, thanks. – Dan Mar 15 '17 at 18:28
  • 1
    Agreed. This worked for me on iOS using only my phone. – jlevis Nov 23 '18 at 20:17
  • 1
    I was able to do this on my Mac (I have 1000+ notes) and it was very sluggish when dragging "all" the notes around, but this method did work for me! The currently-accepted answer (toggle notes off/on in iOS iCloud settings) didn't work. – Nick Farina Apr 8 '19 at 16:26
  • Thanks for the tip! This also worked for me on my iPhone. It was the only one of my devices that didn’t seem indexed properly, and surprisingly it was the only one with most recent updates installed. – jsmod Sep 30 '19 at 2:31
  • Terrible solution! Be very careful if you use folders. I had a lot of folders with subfolders and after doing this step, all 2500 notes are in one folder now. Also, it is not possible to move notes back to Also iCloud folder. Also, remember to use the "option" key when dragging-dropping to create a copy, instead of moving the original if that is your intention. – Eduard Nov 27 '19 at 6:46
4

Notes are stored in under Library/Containers/com.apple.Notes in your user folder. You can force just the notes to be reindexed by Spotlight using the following command in the Terminal:

mdimport ~/Library/Containers/com.apple.Notes

Tested on macOS 10.11.

| improve this answer | |
  • This is probably the best answer for those not using iCloud. For me, the search function on Mac Notes had stopped working completely, it could not find any matches at all. This fixed the problem instantly, took like 2 seconds. I'm on macOS Sierra 10.12.6 btw. – chiappa Apr 27 at 10:24
  • @Miles can this method fix the problem of loading all notes on iphone 7 plus running ios 10.2.1 without icloud ?My iphone notes app stopped loading all my notes however i can search for them from home screen but doesn't load them on notes app when i tap them from home screen search result.It shows endless loading animation on top of notes screen. Hope you can help me thanks – user1788736 Jul 9 at 21:23
3

You should try reindexing spotlight on your mac. In terminal type sudo mdutil -E / and you will be prompted for your password, this can take some time though depending on your drive speed

| improve this answer | |
  • Thanks. Trying that now. I will let you know if this works. – Andrew Eisenberg Jun 3 '16 at 17:03
  • Hmmm...nope. This did not work. – Andrew Eisenberg Jun 3 '16 at 19:34
  • Are you sure this didn't work? Not doubting your honesty, just curious. I thought it would delete all Spotlight indexes and rebuild. Although, as @levanth suggested, it usually takes quite a while. – Ashley Aitken Mar 28 '17 at 2:48
  • 1
    Had this exact problem and sudo mdutil -E / solved it for me on MacOS Sierra 10.12.5. – udondan Jun 21 '17 at 14:58
2

I got this when I tried the mdutil:

$ sudo mdutil -E /
Password:
/:
    Error: unknown indexing state.

Executing the following, reenabled indexing and search through Apple Notes was resolved:

$ sudo mdutil -E -v -i on /
Password:
/:
    Indexing enabled. 
    Scan base time: 2017-05-03 01:14:49 +0000 (2051798 seconds ago), reasoning: 'ScanShadow'
| improve this answer | |
0

For me

sudo mdutil -E -v -i on /

not working then I have to Logout and Sign in again. it's fine now.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .