全文搜索未显示结果

时间:2016-11-23 09:00:22

标签: sql-server

我有一个产品的sql表,其中一个标题为'Beko EV7100',当我搜索7100时,当我搜索EV7100时,此行不在我的搜索结果中。 我究竟做错了什么?你可能会看到下面的查询。

SELECT *, ft.[Rank]
FROM [dbo].[STORE_PRODUCTS] AS sp with(nolock) 
INNER JOIN CONTAINSTABLE([STORE_PRODUCTS], ( title,[short_description],[long_description],permalink_url,meta_keywords), 
ISABOUT ('*7100*', title WEIGHT(0.4), short_description WEIGHT(0.2),long_description WEIGHT(0.2), permalink_url WEIGHT(0.1), meta_keywords  WEIGHT(0.1)) ) AS ft
ON ft.[key] = sp.id     
and ft.[Rank] > 5

1 个答案:

答案 0 :(得分:0)

尝试使用%而不是*

SELECT *, ft.[Rank]
FROM [dbo].[STORE_PRODUCTS] AS sp with(nolock) 
INNER JOIN CONTAINSTABLE([STORE_PRODUCTS], ( title,[short_description],[long_description],permalink_url,meta_keywords), 
ISABOUT ('%7100%', title WEIGHT(0.4), short_description WEIGHT(0.2),long_description WEIGHT(0.2), permalink_url WEIGHT(0.1), meta_keywords  WEIGHT(0.1)) ) AS ft
ON ft.[key] = sp.id     
and ft.[Rank] > 5