2012年3月11日星期日

full text indexing feature of SQL Server .

I am using the full text indexing feature of SQL Server .

I have indexed two text fields in the Content table and two other text fields in the ContentDetail table

The select queries are shown below for the two seperate calls.

I want to be able to show the results based on the rank ( The column that has the best match for the searched key ).

Since I am getting two different RANK arrays from the two calls, can i resort them in the code to get the new rank order to show the results in the screen

SELECT KEY_TBL.RANK,FT_TBL.Description, FT_TBL.Title
FROM Content AS FT_TBL
INNER JOIN
CONTAINSTABLE( Content, * ,
'ISABOUT (Cancer weight(1),Survivor weight(1), Shared weight(1), Story weight(1))' ) AS KEY_TBL
ON FT_TBL.ContentID = KEY_TBL.[KEY]
ORDER BY KEY_TBL.RANK DESC

SELECT KEY_TBL.RANK,FT_TBL.Description, FT_TBL.SubTitle
FROM ContentDetail AS FT_TBL
INNER JOIN
CONTAINSTABLE( ContentDetail, * ,
'ISABOUT (Cancer weight(1),Survivor weight(1), Shared weight(1), Story weight(1))' ) AS KEY_TBL
ON FT_TBL.ContentDetailID = KEY_TBL.[KEY]
ORDER BY KEY_TBL.RANK DESCThat would make a good pole...

How many dba's use this feature...

Never have...from what I understand it's a pig...|||I tried to get Full Text Search to work for a little while, until I realized you can not get "historical" to show up for searches with a search predicate of "history". I also had to make the queries in dynamic SQL, since you have so many dang quotes in the query. Pain in the neck, really.

没有评论:

发表评论