全文索引 实现相关度排序分页
SELECT * FROM ( SELECT ROW_NUMBER() OVER ( ORDER BY rank DESC,PublishDate DESC ) AS rowid , * FROM ( SELECT lp.Ref_Id , lp.ProjectId , lp.ProjectName_CN , lp.PublishDate , KEYS.rank FROM dbo.LM_Project lp INNER JOIN FREETEXTTABLE(dbo.LM_Project, ( Projectname_cn ), '北京') KEYS ON KEYS.[key] = lp.ref_id ) nt )nt WHERE rowid BETWEEN 1 AND 10 SELECT * FROM ( SELECT ROW_NUMBER() OVER ( ORDER BY rank DESC,PublishDate DESC) AS rowid , * FROM ( SELECT lp.Ref_Id , lp.ProjectId , lp.ProjectName_CN , lp.PublishDate , KEYS.rank FROM dbo.LM_Project lp INNER JOIN FREETEXTTABLE(dbo.LM_Project, ( Projectname_cn ), '北京') KEYS ON KEYS.[key] = lp.ref_id ) nt )nt WHERE rowid BETWEEN 10 AND 20 SELECT ROW_NUMBER() OVER (ORDER BY rank DESC,PublishDate DESC ) AS rowid , * FROM ( SELECT lp.Ref_Id , lp.ProjectId , lp.ProjectName_CN , lp.PublishDate , KEYS.rank FROM dbo.LM_Project lp INNER JOIN FREETEXTTABLE(dbo.LM_Project, ( Projectname_cn ), '北京') KEYS ON KEYS.[key] = lp.ref_id ) nt