views:

35

answers:

1

I'm using SQLServer 2008 and if I perform the following query:

SELECT 
  *
FROM
  FREETEXTTABLE(SomeTable, Name, 'a name that I know exists')

I get the rows back that I would expect, but the rank is always 0.

Searching for a solution to this problem, I found this question on the Microsoft ASP.NET forum, and sure enough if I add:

ALTER FULLTEXT CATALOG MyCatalog REBUILD

I start to get a rank - but only temporarily.

I don't want to have to rebuild my catalog every time I do a search especially when I have lots of data in my database and if I add it to my Sproc directly before the query, my query returns no results anyway, presumably because the catalog has finished being rebuilt. There seem to be other people having this and similar problems but I have been unable to find a solution. Any ideas?

+1  A: 

The rank is relative to the other results returned in the query and is therefore only useful for sorting on relevance from the returned values. There is detailed information on the ranking method.

Schmalls