Trying to create an efficient search engine

I am currently doing an application that allows me to offer services to people
services are offered by hospital companies, which have several offices and many services that are provided by many doctors.
The application wants to allow users to search for everything but the most important are the services. We are currently using elasticsearch but we have a big problem
services have the id of the company and office and also the id of all doctors who offer it, if we want to display the names of the company, office and doctors we would have to make relations or save the names within the service, but then if the names change would have to update all services, what should I do? : c