Question : RANKING CONTAINS

Hopefully a simple thing for somebody out there, but has been causing a huge headache for me :(

I have 1 table with 3 columns, 'Headline','SubHeadline', and 'Body' they contain oodles of newspaper and magazine exports.

If i search each using :

SELECT     Headline, SubHeadline, Body
FROM    ECLIPS
WHERE CONTAINS(Headline, 'ISABOUT("michael","jackson")') OR CONTAINS(SubHeadline, 'ISABOUT("michael","jackson")') OR CONTAINS(Body, 'ISABOUT("michael","jackson")')

It will return the results fine, what i want to do is to Rank the results, by multiple keywords or phrases,
So if COlumn contains Michael on its own would rank lower than if it had michael and jackson together or near for example.
I looked at WEIGHT, but dont understand its ranking or how to use the WEIGHT itself?

I know this is going to become a very complicated search in the end especially as i will be introducing NEAR and NOT in my searching, but would like a basic to get me going that would suit the above statement.

If it helps the keywords are in another table and would be obtained by a query of (select SearchGroupID, Keyword, ANDORNOT from Keywords where SearchGroupID= 3)

Help me please, this is driving me nuts !



(SQL SERVER 2008 IS BEING USED, AND THE DATABASE HAS APPROX 500k records in it :()

Answer : RANKING CONTAINS

Forgot to close the ISABOUT:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
SELECT     
  e.Headline, 
  e.SubHeadline, 
  e.Body
FROM 
  ECLIPS e
  JOIN CONTAINSTABLE
  (
    ECLIPS, 
    (Headline, SubHeadline, Body), 
    'ISABOUT("michael jackson" WEIGHT(.5),"michael" WEIGHT(.1),"jackson" WEIGHT(.2))'
  ) e2 ON e.id = e2.[KEY]
ORDER BY 
  Rank DESC;
Random Solutions  
 
programming4us programming4us