Results based on a list of data belonging to the parent


I wanted to fiind out if it’s possible to rank parent results based on a child list.

If I have a baker, with a list of testimonials that have specific skills and location data attached. I want my users to be able to search cup cakes london, and be recommended a baker based on that bakers testimonials.

How should I be thinking about the data structure? At the moment my results show the baker, multiple times, as its searching the testimonial table.