Hi Anjali,
For this type of implementation, you can visit my blog,
There, I have explained, how to achieve this type of requirement.
You can visit my blog by clicking on the link below:
Create custom search filter
Let me know, if you have any issues,
Hope it helps!