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 / June 2004

Tip: Looking for answers? Try searching our database.

full text search weighting on different columns

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Duncan Welch - 23 Jun 2004 22:36 GMT
Hi,

I've not used FT much, but I've successfully created a CONTAINSTABLE query
on a database that contains names and addresses, using a wildcard for the
field names.

Can anyone please point me in the right direction for info on how to
"weight" one field over another?  For example - if someone searches for
"John", the system needs to rank "John Smith" in the "name" column over "10
St John St" in the "address1" column.

Thanks in advance,

Dunc
John Kane - 24 Jun 2004 03:37 GMT
Duncan,
You must join two or more CONTAINSTABLE from the same table or multiple
tables and then use the appropriate weight for each predicate, for example
using the Northwind table Employees and two FT-enabled columns:

SELECT e.LastName, e.FirstName, e.Title, e.Notes
  from Employees AS e,
    containstable(Employees, Notes, 'ISABOUT (BA weight (.2) )', 10) as A,
    containstable(Employees, Title, 'ISABOUT (Sales weight (.5) )', 15) as
B
      where
        A.[KEY] = e.EmployeeID and
        B.[KEY] = e.EmployeeID

Regards,
John

> Hi,
>
[quoted text clipped - 10 lines]
>
> Dunc
 
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.