March 18, 2009 at 1:08 pm
I've created a search for my users to search the title and description and I used full text search and CONTAINS.
I'd like to implement an AutoComplete keyword suggestion for my users ( like Google Suggest ). The keywords I would suggest would be keywords extracted from the title and description columns.
What is the suggested method of extracting a list of keywords from the table? The data is relatively static, so I could create another table just for keywords. It seems like this list pretty much already exists in the Full Text Catalog. Is there someway to get the Full Text Catalog to cough up its list?
March 18, 2009 at 1:31 pm
Wow, it's like going to the doctor for a pain and the pain goes away right when you walk into the exam room...
Anyway, after Googling for hours unsuccessfully, I found what I was looking for minutes after I posted the above question.
SELECT * FROM sys.dm_fts_index_keywords(db_id('DatabaseName'), object_id('TableName'))
If you have Full Text Indexed 'TableName', this will give you the list of keywords in the table which is exactly what I needed.
Here's the article I found: http://technet.microsoft.com/en-us/library/cc721269.aspx#_Toc202506240
I plan to use this only to populate a keyword table, then use the keyword table for AutoComplete. If the data becomes dynamic I may write some triggers for updating the full-text indexes, then repopulating the keyword table...
Hope this helps someone!
February 22, 2016 at 12:12 am
Awesome, thank you for the suggestion. I was searching for this for almost a day.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply