开发者

SQL server Fulltext trouble with period character

开发者 https://www.devze.com 2023-03-06 08:23 出处:网络
I have these rows : ROW 1 containing: How to .405 ROW 2 containing: How to 405 When i use the contains query such as :

I have these rows :

  • ROW 1 containing: How to .405
  • ROW 2 containing: How to 405

When i use the contains query such as : Contains( FIELDNAME, '"405"' )

Or this query : Contains( FIELDNAME, '"405*"' )

I got only the ROW 2 but not the ROW 1 because of the period.

I tried creating an empty stoplist and assigned it to the fulltext, it does not work. I tried the FREETEXT query, it does not work also.

What is weird is when i add one caracter mor开发者_如何学JAVAe to the value of ROW 1 (How to .405M), it works....

How to return also the ROW 1 when querying with only "405" ?

Thanks


Well, a bit old question but:

You did not tell what language you are using, so I will assume you are using english.

That happens because .405 is treated like a number. In English, .405 is a decimal value meaning 0.405. So the ft search will try to find numbers with 405 in the decimal part of them. Ft will also try to find rounded numbers similar to .405.

You should check my question: sql-server-2008-fulltext-rounding-money-value

0

精彩评论

暂无评论...
验证码 换一张
取 消