0

If I perform the following fulltext query:

 SELECT c.CategoryId As ID
      ,c.Title
      ,KEY_TBL.RANK AS [Rank]
  FROM dbo.Category AS c
  INNER JOIN FREETEXTTABLE(dbo.Category, Title, 'back lower pain') AS KEY_TBL ON c.CategoryId = KEY_TBL.[KEY]
  WHERE c.IsActive = 1
  ORDER BY KEY_TBL.RANK DESC

And I have the following two entries in the Category Table

ID | Title      | Rank
-----------------------
12 | Lower Body | 34  
11 | Back Pain  | 34

I would have thought that given "Back Pain" matches two of the three words it would rank higher than "Lower Body" but this isn't the case, the ranks are equal, how can I structure the query so that the ranking reflects this?

Not sure if this is relevant but my Fulltext Index is declared as:

    CREATE FULLTEXT INDEX 
    ON [dbo].[Category]
        (Title)
    KEY INDEX [PK_Category_CategoryId]
    ON [FullTextCatalog]
    WITH CHANGE_TRACKING AUTO
4

0 回答 0