我CONTAINSTABLE
用来搜索两个表格列。一旦搜索包含像 'the' 'for' 'a' 这样的小词,即使它们实际出现在列中,搜索也不会返回任何结果。
快速示例。正在搜索的列包含文本。'系统需要升级'
以下 SQL 返回 0 行
SELECT * FROM Incident WHERE (TicketNumber IN (
SELECT TicketNumber FROM [Action] FT_TBL INNER JOIN
CONTAINSTABLE(Action, Text, '"system" AND "needs" AND "to" AND "upgraded" AND NOT "Search Summary"') KEY_TBL ON FT_TBL.ID = KEY_TBL.[KEY]
UNION
SELECT TicketNumber FROM [Incident] FT_TBL INNER JOIN
CONTAINSTABLE(Incident, Subject, '"system" AND "needs" AND "to" AND "upgraded"') AS KEY_TBL ON FT_TBL.TicketNumber = KEY_TBL.[KEY]))
一旦 'to' 被省略,它就可以正常工作:
SELECT * FROM Incident WHERE (TicketNumber IN (
SELECT TicketNumber FROM [Action] FT_TBL INNER JOIN
CONTAINSTABLE(Action, Text, '"system" AND "needs" AND "upgraded" AND NOT "Search Summary"') KEY_TBL ON FT_TBL.ID = KEY_TBL.[KEY]
UNION
SELECT TicketNumber FROM [Incident] FT_TBL INNER JOIN
CONTAINSTABLE(Incident, Subject, '"system" AND "needs" AND "upgraded"') AS KEY_TBL ON FT_TBL.TicketNumber = KEY_TBL.[KEY]))
这些较小的单词如何CONTAINSTABLE
使用,或者应该完全忽略它们?如果这些较小的词在搜索中实际上是有意义的,那么它们如何被包含在搜索中?