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 / July 2007

Tip: Looking for answers? Try searching our database.

Inter-word searching

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jst1699 - 31 Jul 2007 10:02 GMT
Hi,

Can you guys give me some tips on how to implement inter-word searching in
SS 2005 FTS or any non-FTS way (but has to be MS technology based - company
rules)

E.g. word - AstraZeneca
- doing FTS searching for Zeneca returns zero rows
- Astra* finds the row (OK)

I posted on
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1817332&SiteID=1

but thought I'd try my luck on the FTS forum : )

any help is much appreciated
jt
Daniel Crichton - 31 Jul 2007 12:31 GMT
jst1699 wrote  on Tue, 31 Jul 2007 02:02:03 -0700:

> Hi,
>
[quoted text clipped - 13 lines]
> any help is much appreciated
> jt

SQL Server FTS only allows searching on the start of words, not the end or
middle. You can use the LIKE clause to get around this in SQL Server,eg.

SELECT * FROM MyTable WHERE MyCol LIKE '%Zeneca'

but this is often a lot slower than using FTS.

You could create a reversed FTS indexed column and search on that though,
eg.

PK: REC1
MyCol1: AstraZeneca
MyCol2: aceneZartsA

SELECT * FROM MyTable WHERE CONTAINS(*,'"aceneZ*"')

Of course this means that you have to parse the search terms and create
reversed text as necessary.

The only other thing I can suggest is that if the breaking of "words" in
your searches is on the capitalisation is that you store the broken version,
eg. Astra Zeneca, in your table and FTS that. You could do this in a second
column if necessary so that the original data is retained untouched. This
way searching on just Zeneca will return the row, and doesn't rely on using
the wildcard.

Dan
 
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.