表:tbl_JobFunction
主健:JobFunctionCode
全文索引列:JobFunctionName,JobFunctionDescSELECT JobFunctionCode, 
JobFunctionName, 
JobFunctionDesc
FROM tbl_JobFunction
WHERE CONTAINS(JobFunctionDesc,'"E-commerce"')
结果:
WA 
Web Abuse Specialist
Escalation point for all matters of website abuse.  Maintains the consistency of Company abuse procedures on a continental basis and for given countries.  Abuse procedures and standards may be developed for areas of E-commerce, community, E-messaging, etc.But when exec below sql script:
SELECT JobFunctionCode, 
JobFunctionName, 
JobFunctionDesc
FROM tbl_JobFunction
WHERE CONTAINS(JobFunctionDesc,'"E-commerce*"')
Nothing returned.哪位熟悉的朋友告知一下,为什么会有这种情况发生?

解决方案 »

  1.   

    汗,看你的errormsg看了半天,原来中间还夹着你自己的话!
    try:SELECT JobFunctionCode, 
    JobFunctionName, 
    JobFunctionDesc 
    FROM tbl_JobFunction 
    WHERE CONTAINS(JobFunctionDesc,' "E-comm*" ') 
      

  2.   

    应该是这个的问题。
    你查一下干扰词的文件:C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData\
    一般默认应该是noiseCHS.txt(取决于你的数据库服务器的语言设置),里面包含一些干扰词,默认包含'_'。
    在检索钱系统会把你的干扰词(如'_')全部去掉,用剩下的进行检索。
    也就是说,你用'"E-commerce*"'检索时,相当于用'"Ecommerce*"'检索,因此查不出结果。
    所以两条路:
    1.把noiseCHS.txt里的'_'去掉看看(记得备份。。)
    2.改用like.