Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Other Technologies / Full-Text Search / April 2008

Tip: Looking for answers? Try searching our database.

returning searched text

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ujjc001@gmail.com - 16 Apr 2008 20:18 GMT
Given a search string of "this is a sample of what I want to find" for
example, I want to know what sql fts actually searched for- i.e. the
string w/out the noise words.

Is there a built in function to trim out the noise words?

Thanks!
Jeff
Hilary Cotter - 17 Apr 2008 14:26 GMT
There is a function in SQL 2008 which does this.

In SQL 2000 and 2005 you have to do something like this:

create table NoiseWords(pk int not null identity primary key, NoiseWord
varchar(100))

GO

insert into NoiseWords

exec master.dbo.xp_cmdshell'type %windir%\system32\noise.eng'

GO

delete from NoiseWords where noiseword is null

GO

delete from NoiseWords where noiseword like 'a b%'

GO

declare @counter int

set @counter=97

while @counter<97+26

begin

insert into NoiseWords (noiseword) values(char(@counter))

select @counter=@counter+1

end

GO

declare @searchPhrase varchar(max)

set @SearchPhrase= char(32)+'this is a sample of what I want to find'

select @SearchPhrase=replace(@SearchPhrase, ' '+noiseword+' ',' ') from
noisewords

select @SearchPhrase

GO

> Given a search string of "this is a sample of what I want to find" for
> example, I want to know what sql fts actually searched for- i.e. the
[quoted text clipped - 4 lines]
> Thanks!
> Jeff
ujjc001@gmail.com - 17 Apr 2008 18:27 GMT
Exactly what I was looking for.  Going to try this now.  Thank you.
Jeff
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.