为什么这些查询在 sqlserver 2008R2 和 sqlserver(2012、2014、2016、2017)中有不同的结果?
--SQLSERVER 2008R2
SELECT display_term FROM SYS.DM_FTS_PARSER('FORMSOF(INFLECTIONAL, test)', 1033, 0, 0)
----------
tests
tested
testing
test
SELECT display_term FROM SYS.DM_FTS_PARSER('FORMSOF(INFLECTIONAL, testing)', 1033, 0, 0)
---------
tests
tested
testing
test
第二个查询:
--SQLSERVER 2016
SELECT display_term FROM SYS.DM_FTS_PARSER('FORMSOF(INFLECTIONAL, test)', 1033, 0, 0)
----------
test's
tested
testing
tests
tests'
test
SELECT display_term FROM SYS.DM_FTS_PARSER('FORMSOF(INFLECTIONAL, testing)', 1033, 0, 0)
---------
test
test's
tested
testing's
testings
testings'
tests
tests'
testing
我认为它应该是相同的,但在我的生产数据库中,客户对这种不同的行为有一些问题。
这些是分词器:
--2008r2
wordbreaker 1033 188D6CC5-CB03-4C01-912E-47D21295D77E C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008R2\MSSQL\Binn\langwrbk.dll 12.0.6828.0 Microsoft Corporation
-- 2012
wordbreaker 1033 9FAED859-0B30-4434-AE65-412E14A16FB8 C:\Program Files\Microsoft SQL Server\MSSQL11.SQL2012\MSSQL\Binn\MsWb7.dll 14.0.4763.1000 Microsoft Corporation
-- 2014
wordbreaker 1033 9FAED859-0B30-4434-AE65-412E14A16FB8 C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER2014\MSSQL\Binn\MsWb7.dll 14.0.4763.1000 Microsoft Corporation
-- 2016
wordbreaker 1033 9FAED859-0B30-4434-AE65-412E14A16FB8 C:\Program Files\Microsoft SQL Server\MSSQL13.SQL2016\MSSQL\Binn\MsWb7.dll 14.0.4763.1000 Microsoft Corporation
-- 2017
wordbreaker 1033 9FAED859-0B30-4434-AE65-412E14A16FB8 C:\Program Files\Microsoft SQL Server\MSSQL14.SQL2017\MSSQL\Binn\MsWb7.dll 14.0.4763.1000 Microsoft Corporation
最佳答案
Microsoft 更改了 2012 年设置的 worbreakers。与 2008 年相比,新的 breakers 有其他行为。这就是原因。
关于sql-server - SQL Server 全文搜索 : different results of parsing forms of words,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50948404/