all groups > sql server full text search > june 2004 >
You're in the

sql server full text search

group:

full text search weighting on different columns


Re: full text search weighting on different columns John Kane
6/23/2004 7:37:43 PM
sql server full text search:
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



[quoted text, click to view]

full text search weighting on different columns Duncan Welch
6/23/2004 10:36:08 PM
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

AddThis Social Bookmark Button