How to find the common phrase in a bucket

I want to create an ecommerce search functionality. that user search for a product name and then I group the result base on product category. and then I want to find a common phrase in each category and suggest to user for example.
user search for shoe.
men shoe in men category
sandals shoe in summer shoe category

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.