I have a question what's different between "blah" and "blah*" in the containstable? below is my context.
create table testWildcard(pk int identity constraint twpk primary key, displayName varchar(100))
GO
create fulltext catalog test12 as default
GO
create fulltext index on testWildcard(displayName) key index twpk
GO
insert into testWildcard(displayName) values('blahBlahBlah')
insert into testWildcard(displayName) values('blah<bold>Blah</bold>Blah')
insert into testWildcard(displayName) values('blah Blah Blah')
GO
when use "blah*" as keyword to search, the result is 3 records.
select * from testWildcard t
inner join CONTAINSTABLE(testWildcard, *, '"blah*"', LANGUAGE 1033) as w on t.pk=w.[Key]
results:
pk displayName Key RANK
1 blahBlahBlah 1 16
2 blah<bold>Blah</bold>Blah 2 48
3 blah Blah Blah 3 48
when use "blah" as keyword to search, the result is 2 records.
select * from testWildcard t
inner join CONTAINSTABLE(testWildcard, *, '"blah"', LANGUAGE 1033) as w on t.pk=w.[Key]
resuts:
pk displayName Key RANK
2 blah<bold>Blah</bold>Blah 2 48
3 blah Blah Blah 3 48
Then I use system function sys.dm_fts_parser to analyse the keywords, they don't have any difference. I google it but I still cannot find the proper answer.
SELECT * FROM sys.dm_fts_parser ('"blah"', 1033, 0, 0)
SELECT * FROM sys.dm_fts_parser ('"blah*"', 1033, 0, 0)
result:
keyword group_id phrase_id occurrence special_term display_term expansion_type source_term
0x0062006C00610068 1 0 1 Exact Match blah 0 blah
Thank you.