I am using contains to search a varchar(max) field.
select Page_Id from Q_Page
where contains (Text, 'webapp_user_adduser')
My problem is that the Page_Ids that are being returned don't have the text
I am searching for in them. I get back almost every row. I should only get
back 3 or 4.
I checked the contents of the Text column. Every row has different data.
Almost every search gives me back nearly all the rows in the table.
On XP and Win2003 webapp_user_adduser will not be broken at underscores.
What is the version of your SQL Server, what OS is it running on, and what
language are you searching in?
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Daniel Crichton" <msnews@.worldofspack.com> wrote in message
news:OvJCsoedHHA.1244@.TK2MSFTNGP04.phx.gbl...
> Andy wrote on Mon, 2 Apr 2007 08:32:03 -0700:
>
> Try
> select Page_Id from Q_Page
> where contains (Text, '"webapp_user_adduser"')
> (notice the double quotes around the phrase to force a phrase match).
> I think the _ is treated as a word break, so when you look for
> webapp_user_adduser it's actually searching for webapp, user, and adduser
> individually.
> Dan
>
No comments:
Post a Comment