First off there seems to be no way to get an exact match using a full-text search. This seems to be a highly discussed issue when using the full-text search method and there
You should use full text search CONTAINSTABLE
to find the top 100 (possibly 200) candidate results and then order the results you found using your own criteria.
It sounds like you'd like to ORDER BY
=
)LIKE
)Popularity
columnRank
from the CONTAINSTABLE
But you can toy around with the exact order you prefer.
In SQL that looks something like:
DECLARE @title varchar(255)
SET @title = '"Toy Story"'
--need to remove quotes from parameter for LIKE search
DECLARE @title2 varchar(255)
SET @title2 = REPLACE(@title, '"', '')
SELECT
m.ID,
m.title,
m.Popularity,
k.Rank
FROM Movies m
INNER JOIN CONTAINSTABLE(Movies, title, @title, 100) as [k]
ON m.ID = k.[Key]
ORDER BY
CASE WHEN m.title = @title2 THEN 0 ELSE 1 END,
CASE WHEN m.title LIKE @title2 THEN 0 ELSE 1 END,
m.popularity desc,
k.rank
See SQLFiddle