Windows 11 Pro, SQL Server 2022, SSMS 20.2.30.0
I copied the below code from 'Microsoft Learn'.
use AdventureWorks2022
go
CREATE FULLTEXT CATALOG AdvWksDocFTCat;
GO
CREATE UNIQUE INDEX ui_ukDoc ON Production.Document(DocumentNode);
GO
CREATE FULLTEXT INDEX ON Production.Document
(
Document --Full-text index column name
TYPE COLUMN FileExtension --Name of column that contains file type information
Language 2057 --2057 is the LCID for British English
)
KEY INDEX ui_ukDoc ON AdvWksDocFTCat --Unique index
WITH CHANGE_TRACKING AUTO --Population type;
GO
SELECT Title
FROM Production.Document
WHERE FREETEXT (Document, 'section')
GO
THE PROBLEM IS The last 'select' doesn't find any 'section' values in the Document column.
If I run the below I get two records containing 'section':
declare @theTbl table (
Document varchar(max)
)
insert into @theTbl
select convert(varchar(max), substring(Document, 1537, 100000))
from production.document
select * from @theTbl
where Document like '%section%'
So it appears that there are two rows where the 'Document' column contains the value of 'section' but the FULLTEXT search doesn't find them.
Help!