什么叫做Stop words(干扰词)呢
这些词不用于全文索引。这些词一般都是比较常用的词,一般不用于搜索,如果用于搜索,则有很多返回结果。比如'a','the'这些词。Stop words不用于索引,所以不能被搜索到。
经过测试MSSQL 全文索引的最小单词的长度为2,最大的单词长度为30。也就是为如果长度为1(如'e')的是不能被搜索到的。但('ee')是可以被搜索到的。
Stop words(干扰词)的位置:
这些Stop words根据不同的语言分别存放在不同的文件中。(比如noiseENU.txt, noiseCHS.txt)
用select @@language来查看当前语言
如果你是默认安装SQL的话,目录为:
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData
修改Stop words(干扰词)步骤:
1. disable change tracking
ALTER FULLTEXT INDEX ON kbcontents SET CHANGE_TRACKING OFF
2. Stop full-text catalog population.
ALTER FULLTEXT INDEX ON KBContents STOP POPULATION
3 修改 noiseENU.txt, noiseCHS.txt 文件(最好先备份)
4. Repopulate the full-text catalogs.
ALTER FULLTEXT INDEX ON table_name SET CHANGE_TRACKING AUTO
默认英文干扰词列表 (“noiseENG.txt”):
1 | before | these | on | him |
2 | being | they | only | himself |
3 | between | this | or | his |
4 | both | those | other | how |
5 | but | through | our | if |
6 | by | to | out | in |
7 | came | too | over | into |
8 | can | under | re | is |
9 | come | up | said | it |
0 | could | use | same | its |
about | did | very | see | just |
after | do | want | should | like |
all | does | was | since | make |
also | each | way | so | many |
an | else | we | some | me |
and | for | well | still | might |
another | from | were | such | more |
any | get | what | take | most |
are | got | when | than | much |
as | has | where | that | must |
at | had | which | the | my |
be | he | while | their | never |
$ | have | who | them | no |
because | her | will | then | now |
been | here | with | there | of |
would | you | your | ||
a b c d e f g h i j k l m n o p q r s t u v w x y z |
相关搜索: change fulltext index minmum length MSSQL, 全文索引的单词长度受限