I’m currently developing an e-commerce application focused on automobile parts
I have to implement search functionality.
I am using MongoDB with mongoose in NodeJS.
It have different mongoDB collections:
- Brand
- CarModel
- Category
- Part
For example if search string is : “mahindrabrake” without even the space in the words, so it must give the brand: “Mahindra” and category: “Brake”
more examples of input search strings:
Input | Output |
---|---|
“mahindra xuv 500 belt” | Brand: “Mahindra”, Car Model: “xuv 500”, Category: “Belt” |
“sonet” | Brand: “Kia”, Car Model: “sonet” |
I’m looking for a solution on how to parse and extract relevant information from these concatenated search strings efficiently, ensuring accurate results are returned to the user.