日期:2014-05-17  浏览次数:20477 次

全文索引 英文下逗号,空格字符等都导致错误问题
全文索引 小写的逗号,或者空格都会导致搜索错误。
刚开始我以为只是小写的空格,然后用大写下的空格替换了关键词,暂时解决了,后来发现小写的逗号等也会出现此类问题
----------------------------
全文索引字段类型:varchar
断字符语言:简体中文
----------------------------
其实我搜索基本以英文为主的,我现在在把断字符语言改为:english

估计数据多,现在生成速度很慢,半小时了还没生成。

不知道是否跟这个有关。。。。。
----------------------------

等不及自己调试了,希望网上知道的大侠给个好的解决方法·····(全文索引 小写状态的逗号,或者空格都会导致搜索错误。)
------解决方案--------------------
to csw200201 
全文索引生成是没错的。
就是前台程序,输入关键词进行搜索的时候,假如输入的关键词中包含"," or " "  or  "&",传入到SQL进行搜索,都会导致SQL搜索出错。
do u understand?
------解决方案--------------------
引用:
to csw200201 
全文索引生成是没错的。
就是前台程序,输入关键词进行搜索的时候,假如输入的关键词中包含"," or " " or "&",传入到SQL进行搜索,都会导致SQL搜索出错。
do u understand?


Firstly, or or comma will be ignord by the full text search anyway (they are part of the system stop list).

Secondly, to include them in the search term, simply need to enclose the term within double quotation. For example, the following will not produce any syntax error

select * from test where contains(textvalue, '"or"')
but
select * from test where contains(textvalue, 'or') will.