Unofficial archive. This is a read-only, community-run archive of the Apple Support Community. It is not affiliated with or endorsed by Apple Inc.

keyword search stopped working in Photos

Sonoma 14.6

Photos: 9.0 (661.0.111)


After the most recent security update on Sonoma 14.6 searching for photos within the photos app stopped working. If I search for something I know is there, like the name of the most recent file uploaded or a keyword I know exists like my wife's name, I get no results almost instantly. This is a new bug.


[Edited to add:]

I rebuilt library using the Option / Command key thing (two times)

I opened up a different library thinking maybe it just got confused

I checked the external drive using Disk Doctor and it checked out OK.

I waited 3 days to ensure any indexing had time to finish.



I have not copied my library to the internal Mac drive because it is 500gb and my internal drive is only 512gb.


I am running a MacBook Pro 13", M1 chip, 16gb RAM. 512gb internal SSD.

The external drive is a Sandisk 1TB SSD

26 replies

UPDATE - I opened the "container" for the photos library. There is a folder inside that container called Database with a sub folder called "Search". After ensuring I had a backup of my photos library AND a copy of the contents of this database folder in the library, I deleted all the files and the folder called "search".


I then launched the photos app and it rebuilt the database. Viola, keyword search is working now.


It must have been some file didn't close properly or open properly with the last update.


Thanks all who made suggestions, your discussions triggered the idea that it may be some file corrupted. All is fine in the Appleverse for now.

Jeff

As a test, you may want to add the keyword to "Cardinal Flower" to the Quick Group in th Keyword Manager. Then you can search for this keyword using the "Showing" Filter field in the upper right corner of the Photos Window.


I found that using the filter will give better results on Sonoma than typing a keyword into the search field. Also searching with a smart album based on the keyword may give better results.



Have you installed and run any "cleaning", "optimizing", "speed-up", anti-virus or VPN apps on your Mac?


Download and run Etrecheck. 


Copy the report



and use the Additional Text button to paste the report in your reply.



Then we can examine the report and see if we can determine the cause of the problem.



Had the exact same issue. As you suggested, deleting the files in the Search folder in Database folder in photos library container solved the issue immediately.


Big thanks to you for solving and posting the solution to this issue.

How is the external drive formatted?

Have you tried repairing the library by launching it with the Option+⌘ keys held down?


It is seeming more to me like an index file didn't update properly or had a hiccup when the new version of the operating system installed.


Is there a photos library index file that can be deleted or forced to reindex? I really don't want to import 500gb of images and videos, and have those all re-synch to iCloud just to find out that wasn't the problem or there was some file hung up that I could have deleted and had fixed in minutes instead of days.

The newer systems are less compatible with that type of app. There is no reason to ever install or run any 3rd party "cleaning", "optimizing", "speed-up", anti-virus, VPN or security apps on your Mac.  This documents describe what you need to know and do in order to protect your Mac: Effective defenses against malware and other threats - Apple Community and Recognize and avoid phishing messages, phony support calls, and other scams - Apple Support.  


There are no known viruses, i.e. self propagating, for Macs.  There are, however, adware and malware which require the user to install although unwittingly most of the time thru sneaky links, etc.   


Anti Virus developers try to group all types as viruses into their ad campaigns of fear.  They do a poor job of the detecting and isolating the adware and malware and often provide false positives.  Since there are no viruses these apps use up a lot of system resources searching for what is non-existent and adversely affect system and app performance.


There is one app, Malwarebytes, which was developed by a long time contributor to these forums and a highly respected member of the computer security community, that is designed solely to seek out adware and known malware and remove it.  The free version is more than adequate for most users.  


I recommend you uninstall the Norton/Symantec software according to the developer's instructions.


You can check to see if you've removed all of the supporting files by downloading and running the shareware app Find Any File to search for any files with the application's or the developer's name in the file name.  For the fore mentioned software you'd do the following search(es): 


1 - Name contains norton

2 - Name contains symantec


Any files that are found can be dragged from the search results window to the Desktop or Trash bin in the Dock for deletion.


FAF can search areas that Spotlight can't like invisible folders, system folders and packages.  


If you get warnings that the file can't be deleted because it is in use or used by another app boot into Safe Mode according to How to use safe mode on your Mac and delete from there.


Note:  if you have a wireless keyboard with rechargeable batteries connect it with its charging cable before booting into Safe Mode.  This makes it act as a wired keyboard as will assure a successful boot into Safe Mode.


If Norton is subscription software then another thing it does is lighten your bank account without providing any value.



Go to your Photos Library, probably in your pictures folder.

right-click to get the contextual menu and select "open package contents"


The rest of jeffnless instructions should be clear.

Unfortunately, I did. One thing I forgot to mention is I am running the library on an external drive. However, I have been running my Photos Library on external drive since sometime around 2016 through multiple iterations of MacOS so I don't think that is the problem


Steps so far:

I rebuilt library using the Option / Command key thing

I opened up a different library thinking maybe it just got confused

I checked the external drive using Disk Doctor and it che 00004000 cked out OK.



I have not copied my library to the internal Mac drive because it is 500gb and my internal drive is only 512gb.


I am running a MacBook Pro 13", M1 chip, 16gb RAM. 512gb internal SSD.

The external drive is a Sandisk 1TB SSD


Text will be below.

To answer other questions:

1) I have not done any cleanup recently.

2) I do have Syamantec Norton 360 installed but that has been installed for at least 2. years. Nothing has changed with the configuration.


The one process that is using a lot of CPU time is photoanalysisid.

Is it possible it is just still indexing my photos library and it may take a week to get it done?




Yes, the quick groups works. That would be a pain as I have hundreds of keywords and locations. creating a group for all of them when I want to do a quick search. I am a wildlife and nature photographer and I have the images in my library key worded by animal species, plant species, insect species, etc. Hundreds of them across close to 30,000 images.


Oddly, this worked up until the most recent security update for macOS Sonoma 14.6. That is when it quit working.

Interesting discussion about VPN and such. However, that wasn't the question being asked. If you look at my post of Aug 6, 2024 at 12:38, you will see what the resolution was. I'm still unsure what was the cause but the fix is outlined in my response to this thread.


Thanks everyone for the suggestions.

Jeff


He keyed in on OT's boilerplate:

"There is no reason to ever install or run any 3rd party "cleaning",

"optimizing", "speed-up", anti-virus, VPN or security apps on your Mac. "


and hijacked the thread.

I've been having the same problem and would love 00004000 to try your solution. Can you explain (to a non techie) where I can find the "container" for the photos library? I need the exact path to find this. I assume you mean in my user library > photos>libraries>(here I have something that says syndication.photoslibrary which I can "show contents" and then I see a folder that says search. Is this the correct folder? Any help you can provide would be greatly appreciated. Thanks.


Michelle Lyons wrote: Can you explain (to a non techie) where I can find the "container" for the photos library?

Since you're a self-described non techie, I want to add a warning to Keith Barkley's and jeffnles1's very clever insights: Be very careful opening the Photos Library package! Pay special attention to jeffnles1 saying, "After ensuring I had a backup of my photos library AND a copy of the contents of this database folder in the library, I deleted...."


Don't fool around inside the Photos package without having a backup!


Some things, when messed up in there, can irretrievably confuse the Photos database, so you lose contact with your pictures. So, play around in there all you like, but have a backup!

Thank you so much for your response. I have been working with Apple for the past week and try all kinds of suggestions for at least a week before that. Jeffnless suggestion and your quick response just fixed this for me in less than 15 minutes!


Thank you for your warning. I really just didn't fully understand which "container" Jeff meant but I ALWAYS back up and did make a copy of the folder he was referring to. But thanks to the quick reply from Keith I am bac 00004000 k to having a functioning search feature. I emailed my Apple Support guy who has been trying to help me for a week. Hopefully they will be able to help the next person who runs into this problem.

See image below. It is formatted the same as it always has been. - AFPS


"Is it possible it is just still indexing my photos library and it may take a week to get it done?"

This is very possible.



Thanks. I'll hang tight for a few more days.

I hear what you are saying; however, this worked up until the most recent security update to Sonoma. Nothing else changed. I kind of doubt Norton is the culprit here.

Very cool!

aah! I had meant to put in the warning and add the backup advice, thanks, Richard.

I wish this thread had not gotten off onto that VPN tangent.

Keith Barkley wrote: ... I wish this thread had not gotten off onto that VPN tangent.

Right-- it made it hard to follow. You never know what'll happen...

@jeffnles1 Thank you! This worked great for me.