Does Full text search have problems with numbers?
I have a text field in a table that has been full text indexed. Some of the data in some of the fields start with numbers.
For Example
"123p45 the bla bla bla"
When I run a standard SELECT statement on LIKE '%p4%' it returns the above record.
If I run a full text query using CONTAINS(fieldname,'"*p4*"') it returns nothing.
After much head banging I was able to get the CONTAINS to work when I used *123p4*
I figured since there are alpha characters after the p4 the second * works however since there are no preceeding alpha characters before the p4 it fails.
I would like to be able to do a "full text" search for the "p4" and get the record above.
Any feedback would be appreciated..
Unfortunately the word breaker will break the word at the beginning and the end of the numeric character. A workaround would be to use a function which translates the digits into words. The same would have to be done after specifying the search string.Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||
The asterisk at the beginning of a CONTAINS searchword substitute not n-characters like it is in the LIKE search, ikt substitutes n-(broken) words, so if the parts before your *searchword* it not a valid word, the wordbreaker will not find it.
e.g. You saved in the database in one datawor the word TRACE in another the word SPEEDRACE, the query CONTAINS(SomeColumn, '"*Race*"') will find the Speedrace, but not the TRACE as the word will not be broken after the T of TRACE.
Jens K. Suessmeyer.
http://www.sqlserver2005.de
没有评论:
发表评论