Linq (or SQL): get the search query and sort it by the best result

I want to create a search page for my site. The logic is that the user enters some keywords, and I have to search for these words, and then sort the result by the best matches. that is: The user enters: "MVC Microsoft WPF ASP.Net". I want to show those results that contain most matches, for example:

Best Matches:
Explore Microsoft ASP.Net MVC
How to Post a WPF Form in Microsoft ASP.Net

Partial matches:
Microsoft MVC
Microsoft WPF
Microsoft ASP.Net
ASP.Net MVC

Keyword Matches:
MVC
Microsoft
WPF
ASP.Net

+3
4
+2

, / , , Google API Google.

0

; :

  • "%".
  • - . , "" .
  • Select each individual result from this temporary table with a count of the number of times that appears in the temp table. This is your “relevance” with which you can sort.
0
source

All Articles