3

When doing a spotlight search for my bookmarks, some of them appear in the search result but some don't. I was not able to find a pattern about which ones will show up and which ones won't. Newly added bookmarks are found but some older ones aren't.

I've looked in ~/Library/Caches/Metadata/Safari/Bookmarks and found two interesting things:

  • Some old bookmarks (no more present in Safari) have a webbookmark file in this folder
  • Some existing bookmarks in Safari don't have an existing webbokmark file there

I tried to rebuild the Spotlight index but the same bookmarks are missing. The quite basic "Edit bookmarks" menu in Safari doesn't provide any advanced option to manage the bookmarks database further.

Is there a way to force Spotlight to refresh the bookmarks part of its index? Unless it's on safari side that something has to be done?

I have also seen that bookmarks data are stored in ~/Library/Safari/Bookmarks.plist. Which location is the correct one? From where does Safari get its bookmarks? ANd then, what is the purpose of the other location?

I have iCloud for Safari enabled (as I want to share my bookmarks on my iPad and iPhone). It may be another parameter in the problem. However, I don't want to deactivate/reactivate it without being sure I won't loose my bookmarks as I don't know which one will be the master (local/iCloud) and not really knowing the content of my iCloud bookmarks.

  • What is a example of a spotlight search (when it does not find it) – Ruskes Jun 15 '15 at 0:15
  • @Buscar웃SD I'll look at this when back at home this evening but could it depend on the bookmark title? I have no special character in them, just plain ascii. – LudoMC Jun 15 '15 at 6:50
  • Also added the n-1 paragraph about the Bookmarks.plist file, which adds to the confusion (for me) – LudoMC Jun 15 '15 at 9:49
1
+50

The ~/Library/Caches/Metadata/Safari/Bookmarks contains bookmarks that get updated by Safari every time you start it. If you look at the date, you will see it only contains the current date.

  • Spotlight will only show bookmarks that have been updated by Safari in that folder. If for some reason a bookmark is not updated it will not show in Spotlight.

The ~/Library/Safari/Bookmarks.plist does contains bookmarks that are readable in plain text, that file is intended to manage the bookmarks organization.

  • Spotlight will not search inside this file.

Potential fix:

  • Remove current bookmarks in ~/Library/Caches/Metadata/Safari since the Safari itself would be unaffected by the removal of the contents and will rebuild it; as I understand it, those files exist to allow Spotlight searches to include bookmarks.

  • Close Safari and move the Bookmarks.plist file to Desktop and restart Safari. Now all bookmarks are gone in Safari it self. Move the Bookmarks.plist back where it was and restart Safari and you will have all bookmarks back.

  • Thanks for the clear distinction between the two locations. I was finally able to fix my issue. The main problem is not knowing what is in iCloud! So deactivated it on iPhone & iPad, deleted everything from the Mac (after backup of the .plist). Had to do it several times as some bookmarks kept popping up after enabling it again on my iPad. When nothing was sync'ed back from iCloud, I copied back my saved .plist, let it the time to upload to the cloud, reactivated on my mobile devices and voilà! It also fixed the Spotlight part. So everything's good now! Hope it will stay this way :) – LudoMC Jun 16 '15 at 16:24
  • I tried this, but it didn't work. What's weird is that I can find my "lost" bookmarks by preceding their title by a single quotation mark in the Spotlight search field: so class rosters becomes "class rosters Does that make any sense? – odysseus Nov 6 '15 at 5:09

You must log in to answer this question.

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