2016-11-23 215 views
0

我有一個產品的sql表格,當我搜索7100這個行不在我的搜索結果中時,我搜索EV7100的時候,它的值是標題'Beko 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 

回答

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 
+0

也沒有工作 –