Like others suggested, immich might be able to solve the use case - it just means you have to sync your photos to immich for the server to index the photos. Then in the app you can search for any recognized objects / locations / etc so from your phone it works about the same as Google photos search. Like I can search beach or cat or whatever from my phone and find all of those photos, and it's private since it's self hosted.
I run immich on my nas so it does both photo backup and provides a nice high performance searchable app / web UI to browse and organize photos into albums. It also does private face recognition and tags people, which are searchable too (the most recent app update actually just brought advanced search to the mobile app) so you can select john doe under the people filters and search fish and up comes only pictures of john showing off fish he caught.