create table book (title char(100) not null,notes varchar(1000))
--索引
create unique index pk_title on book(title) 
----插入数据
insert into book(title,notes) values ('SQL Server','SQL Server Thanks for the information.I will contact you later, if the AP team needs any information regarding the job.')
--execute sp_fulltext_database 'AllSearch'--建立全文目录ft_pubs
execute sp_fulltext_catalog 'ft_test','create'--为titles表建立全文索引数据元,pk_title为book表中由主键所建立的唯一索引,此参数必须。
execute sp_fulltext_table 'book','create','ft_test','pk_title'--设置全文索引列名
execute sp_fulltext_column 'book','title',' add'
execute sp_fulltext_column 'book','notes','add'--建立全文索引
execute sp_fulltext_table 'book','activate'
--填充全文索引目录
execute sp_fulltext_catalog 'ft_test','start_ full'
select title from book where notes like '%Server%'
select title from book where contains(title,'Server')以前在社区中看过一个帖子也出现过这种现象,但不知道解决办法,哪位遇到过这种问题?
解决办法????

解决方案 »

  1.   

    我也遇到了此类情况,,,用contains(gc_resume,'招标') 报错
    以前在另一台服务器上没有错,,现在换成打了sp4补丁的sql上出错,,是不是打了sp4原因,要另外的写法呢??
      

  2.   

    填充需要时间, 过一两分钟再检索应该就可以了.--建立全文索引
    execute sp_fulltext_table 'book','activate'
    --填充全文索引目录
    execute sp_fulltext_catalog 'ft_test','start_ full'
    gowaitfor delay '00:05:00'  -- 等5分钟再检索数据, 一般就没有问题, 立即检索很少有能检索出数据的
    go
    select title from book where notes like '%Server%'
    select title from book where contains(title,'Server')