SQL全文返回错误的行? [英] SQL Full Text returns wrong rows ?
问题描述
你好CP
我的全文索引有问题。
如果我搜索对于香蕉我得到的行水果等等,为什么???我在这里缺少什么?
Hi CP
I'm having trouble with an Fulltext Index.
If I search for Banana I get rows with Fruit and so on, why ??? what im I missing here ?
SELECT * FROM text_search WHERE CONTAINS(textvalue, '"Banana"')
推荐答案
除其他外,CONTAINS返回同义词,请注意最后一项:
Among other things, "CONTAINS" returns synonym, note the last item:
CONTAINS可以搜索:
单词或短语。
*单词或短语的前缀。
*单词附近的单词。
* A从另一个词中生成的词(例如,词驱动器是驱动器,驱动器,驱动器和驱动器的拐弯词干)。
*一个词是使用同义词库的另一个词的同义词(用于例如,metal这个词可以有铝和钢之类的同义词。
CONTAINS can search for:
A word or phrase.
* The prefix of a word or phrase.
* A word near another word.
* A word inflectionally generated from another (for example, the word drive is the inflectional stem of drives, drove, driving, and driven).
* A word that is a synonym of another word using a thesaurus (for example, the word "metal" can have synonyms such as "aluminum" and "steel").
来自 CONTAINS(Transact-SQL) [ ^ ]
++++++ [第2轮] ++++++ />
如果正在寻找模式匹配,请尝试 LIKE [ ^ ]。例如,
from CONTAINS (Transact-SQL)[^]
++++++[Round 2]++++++
If are looking for pattern match, try LIKE[^]. E.g.
SELECT * FROM text_search WHERE textvalue LIKE '%Banana%'
这篇关于SQL全文返回错误的行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!