News · New this week
Google Photos search: how typing "beach" finds photos
Analyse at upload, look up at search. Here is why typing "beach" works without scanning your photos, and how to explain it in an interview.
You typed "beach" in Google Photos and every Goa trip photo showed up. You never tagged a single one. The common guess is that the app scans everything the moment you hit search. It doesn't.
One note before we go on. This is a common system design interview answer. It is not the exact system design of Google Photos.
Why scanning at search time fails
You have thousands of photos. If AI went through all of them every time you searched, it would take forever.
So the work has to happen somewhere else.
The work happens at upload
When a photo comes in, image models check what's in it, what kind of place it is, and whether it has any text. Those checks produce labels.
That analysis runs when you upload the photo. The labels then need somewhere to go. They go into your own index.
The index is the list at the back of a book
Think of the list at the back of a book. Beach, these photos. Dog, these photos.
When you search "beach", it just reads that list. Each photo gets looked at once, when you upload it. After that, search is only a lookup.
That is why the search feels instant even though you never tagged anything. The slow part already happened earlier.
Faces get grouped too
The same question comes up for people. How are all your friend's photos in one place? Photos with similar faces get grouped into one cluster.
How to say it in an interview
Keep the answer short. Analyse at upload, look up at search.
Then fill in the pieces. Image models label what's in each photo, the kind of place and any text. The labels are stored in your own index. Search reads that index. Similar faces are grouped into clusters. Say plainly that this is a common interview design and not Google Photos' exact internal system.
The reel closes with a question worth answering out loud. Would you label at upload or search on demand?
Next time this comes up, practise the one-line version until it comes out without thinking: analyse at upload, look up at search.



