Full text index an indexed view. Have the view only show you the rows where
active=2. This is only available in SQL 2005. In SQL 2000 you would have to
partition the table into child tables where one of the child tables would
only have rows where the status column is 2.
--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com [quoted text, click to view] <mark.brady@reedbusiness.com.au> wrote in message
news:1157942252.077692.218360@q16g2000cwq.googlegroups.com...
>I have recently used the 'top_n_by_rank' clause in a full text
> query in order to reduce the query execution time.
>
> Here is the senario - we have a table called 'article' that has
> three fields.
> ID int,
> Active bit,
> Body varchar(8000)
>
> I want use the top_n_by_rank clause to only return the top 10 articles.
> Simple enough but out of the top 10 articles returned only 2 of those
> were active.
> Is there a way to conditionally query a catalogue field?
>
> My FT query is below:
>
> SELECT
> *
> FROM
> Article AS FT_TBL
> INNER JOIN CONTAINSTABLE(Article,
> Body,
> @vchQuery,
> 10
> ) AS KEY_TBL ON FT_TBL.ID = KEY_TBL.[KEY]
> WHERE
> FT_TBL.Active = 1
>
> This seems to return the top 10 articles from the catalogue then
> filters based on the where clause. I would like it to filter before
> doing the FT search.
>
> Thanks
>