Search by location and name

I have a directory page where trainers are listed based on location.
I have a search bar which is based on geographic address. When user enters a location trainers are shown around this location.

I now want to add an option to search by name as well. Is there a way I can do this in the same search element?

yeah, you can filter by name. create a new data in your database with a geolocation field and a name field. Then set your search bar to search by the data you created and filtered by either geolocation or name