Hi,
I need to let the enduser type search strings like :
Volvo S70 OR S60 > All posts that contins Volvo OR S70 OR S60
Volvo S70 NOT S60 > All posts that contains Volvo and S70 but not S60
“Volvo S70” > All posts that includes “Volvo S70” as one string
Volvo S* > All posts that contains Volvo and a word starting with S
“Volvo S70” “Volvo S60” V* > All posts that contains “Volvo S70” or “Volvo S60” Or a word starting on V
Vo*l* S* > * is treated as wildcards so in this case posts that contains Vo*l* or S*
This is just a small part off possible combinations.
How do I handle this with Linq to Object?
I Know that I can use StartsWith, EndsWith, Contains but this will mean that I have to split the incoming search string, is this the only way? And how do I then handle strings like Vo*l*?
BestRegards
Edit1: The data have been fetched from database with entityframework, this means that the data is now in application (List)
My solution is to use ESQL like this :