I think this may have been asked for million times... but for some strange reason, i couldn't find anything related about that in this forum.....
So, just wondering if there is any way to handle special characters like "&" in full text search ?
like "AT&T" ?
cause when I do a simple select * contains AT&T, it won't return any result ...
thank you in advance.
I believe this is because of the noise word filter. Sql treats & as a word breaker, so what Sql is actually executing is "AT T"However, if you look at the noise file, both "at" and "t" are filtered out of full text searches. So my suggestion would be to take these two out of the appropriate noise file and check the search again. Otherwise, you're probably going to have to do some transformation of data.
You can test this theory by inserting a new record like Jones&Smith into the same column that AT&T is in. If you can get it to return results against either "Jones" or "Smith" than the noise filter is your problem.|||
thank you so much
I think that is the problem
but then I have another problem...
since my website is host on a share server... i don't have access to the noise file...
Is there anything I can do on my side so that i can include the noise words that are defined in the nosie file?
thank you so much
|||That is a good question. My inclination is that you are SOL. An alternative would have to replace all the ampersands in that column with a token or something. An example would be AT[AMP]TBut then you would be responsible for everywhere in your code, to know to replace an & going in with [AMP], and also take it back to & when it comes back out.|||
Thank you so much
But i guess that would mean a whole lot of replacing to handle...
haha, so there isn't any way... to tell the sql server to .... "hey, ignore the noise words when doing full text index for a specific table", right?
haha
thank you so much
-------------------
大作
|||The only thing I have been able to find is this thread which suggests using quotes, but the answer appears to be in FREETEXT. Take a look at the FREETEXT option and see if it does what you need.http://groups.google.com/group/microsoft.public.sqlserver.fulltext/browse_thread/thread/235f8f5cb0f12c47/edad245b4216abe6%23edad245b4216abe6sql
没有评论:
发表评论