I am getting some strings from a frontend and I would like to find all entries in a full text indexed view that match as many of these strings as possible. Example strings would be:
Bla di bladi
This can be translated into this query:
SELECT
*
FROM [Schema].[SomeFullTextIndexedView]
WHERE CONTAINS (*, '"*bla*" OR "*di*" OR "*bladi*"')
which works fine. Let us say that for the sake of argument the query returns these results:
Column1 Column2 Column3
bla rte
bla di xxx
bladi tttytyt
bla di bladi
What I would also like to do is introduce some kind of rank where rank is larger the more strings are matched. The rank is then used to sort the results descendigly:
Column1 Column2 Column3 Rank
bla di bladi 3
bla di xxx 2
bla rte 1
bladi tttytyt
1
Is there anything in full text search that I could exploit for this? Thanks.