Hi, how can I programatically identify if table columns are eligible to include in a FTS catalog index?
I can do this:
SELECT COLUMNPROPERTY (object_id('Person.Address') , 'AddressID', 'IsIndexable' )
but what I'd like to do is:
SELECT COLUMNPROPERTY (object_id('Person.Address') , 'AddressID', 'IsFullTextIndexable' )
but that property doesn't exist. The best I got sofar is to compare data types with what the documentation says, something like this:
...
if (tc.Text == "char" ||
tc.Text == "varchar" ||
tc.Text == "nvarchar" ||
tc.Text == "varbinary(max)" ||
tc.Text == "text" ||
tc.Text == "image")
...
but I'd like something less hard-coded like a column property. In fact, in another place in the Books Online there's a document that syas that you can also use nchar, ntext, xml, and varbinary without the (max) in an index; so, which data types are really supported then?
Regards, and TIA,
Pieter
Sorry, I just saw there's a more appropiate forum for FTS (SQL Server Database Engine) so I post the same Q there too.
Regards, Pieter
没有评论:
发表评论