MongoDB substring product search order by highest match
I'm not so good in Mongodb. That's my first project using this. I'm working on some sort of shop website. We're using C# and newest C# driver for mongodb. I need an idea how to implement my algorithm to filter products based on user's input. Here's how my algorithm works/should work. User type something like "Blue adidas men spiderman cotton t-shirt" I split whole phrase into single words so I have "blue", "adidas", "men", "spiderman", "cotton", "t-shirt" I check each word against retailer, color, category names in my db. So here's how it goes. "Blue" - oh, it's a color filter let's filter