Jerry,
I don't know of a way to get the number of word hits in a document or a
database row (except looking for it yourself, as you mentioned) in SQL
Server 2005 or earlier.
However, if all you are wanting is to to order the results with the most
hits at the top, you could look into the CONTAINSTABLE or FREETEXTTABLE
functions, which can be specified to return the top n rows from a full text
query. Read more about these in the Books Online.
If you want to know how many hits per word in a document, SQL Server 2008
has a new dynamic management view, sys.dm_fts_index_keywords_by_document,
that will show you the information:
http://msdn.microsoft.com/en-us/library/cc280607.aspx
However, Simon Sabin points out that this is a very expensive view to look
at dynamically. He has recommendations on what you should do if this is
valuable information to you for query purposes.
http://sqlblogcasts.com/blogs/simons/archive/2008/02/20/SQL-Server-200...-iFTS-T
RLF
"DAXU" <DAXU RemoveThis @hotmail.com> wrote in message
news:00769451-4bdd-4656-9f62-b38d47f95b57@l64g2000hse.googlegroups.com...
> Hello,
>
> I am fairly new with full text search. I managed to put the contains
> search right. But is it possible to return the amount of keywords
> found?
> For example, if the keyword searching is "law", both rows:
> 1. law and order
> 2. family law and Chinese law
> are found.
> But how can I return the amount of keyword found (except for having a
> function to search for the keyword manually)?
>
> Many Thanks
>
> Jerry