views:

208

answers:

1

I have a sql full text catalog on a cms database (SQL 2005). The database holds the CMS page content within a ntext column which is part of the full text catalog. As expected the searching takes into account the xml tags within the page content so searching for "H1" returns all the pages with H1 tags.

Is it possible to apply filters within the full text search to only index data within the xml tags.

I can see it is possible for SQL full text search to index/search .html binary types or xml columns. However as you can see the setup is slightly different to this.

Many Thanks,

Adam

A: 

Unfortunately, you can't change away from the default "text" iFilter on a text/varchar ntext/nvarchar column.

If you can't change the data type of the column to varbinary, your next-best bet might be to add the HTML tag names as stop words, so they get ignored during indexing and searching.

I should add that ntext has been deprecated, so you will need to move away from it eventually anyway.

RickNZ