Is there a way to ignore . as a word breaker for full text in SQL Server 2008. The main purpose of this is I want to be able to seach ip addresses in fulltext search.
Asked
Active
Viewed 154 times
1 Answers
0
Changing word breakers is not an easy task. Also it becomes more complicated because ignoring dots in general will probably generate other problems to parsing.
Alternatively you can replace the dots within IP addresses with a letter before sending a string to the server.
If for example your string is
"Is there any connection between localhost and 127.0.0.1?"
you can modify it (regex is the greatest option) to
"Is there any connection between localhost and 127d0d0d1?"
and pass it to the server.
The later used with parser
select *
from sys.dm_fts_parser(
'"Is there any connection between localhost and 127d0d0d1?"'
,1033
,0
,0);
returns 8 records; the last one is 127d0d0d1 as expected.