I have full text catalogue defined on below table on all_metadata row:
ft_id record_id am_changestamp all_metadata
21 42 2012-09-11 17:07:25.553 Photos Project 1234 5678 |Mockups|pictures|Abbot| testing Revenue migration testing Getty Images Abbot g test.txt
22 43 2012-09-11 17:11:06.147 Photos Project 1234 5678 |Mockups|pictures|Abbot| testing Revenue migration testing Getty Images Abbot g test1.txt
The SQL I am running is:
select f0.record_id from ft_all_metadata as f0,
containstable(ft_all_metadata, all_metadata, N'Images') as kt where f0.ft_id = kt.[key]
The SQL returns the first row but not the second!!!! I am really baffled!
I have tried re-creating and re-building the full-text catalogue with no luck.
Your help is appreciated,
Bruce
I had relied on SQL Server Manager GUI to do this and must have done something incorrectly.
So decided to do this through commands and this works now:
exec sp_fulltext_catalog ‘Catalogu_Name’, ‘create’
exec sp_fulltext_table ‘table_name’, ‘create’, ‘Catalogu_Name’, ‘table_index_name’
exec sp_fulltext_column ‘table_name’, ‘column_name’, ‘add’
exec sp_fulltext_table ‘table_name’, ‘activate’
exec sp_fulltext_catalog ‘Catalogu_Name’, ‘start_full’
I created a separate index for table_index_name on the primary key.