相关疑难解决方法(0)

NHibernate + SqlServer全文搜索

我必须在NHibernate中进行全文搜索

对于以前的操作我以前使用的是Lucene.Net

我有一张名为候选人的表

对于全文查询,Lucene将从lucene索引返回所有候选Id并形成我在候选中查询的id并返回结果

但问题是有超过10个缺少候选简历可用,所以Lucene非常慢,因为10 Lk行的过滤值并且在查询中对候选者和再次过滤候选者的返回值花费了太多时间

我也有一个寻呼标准,每个页面我返回100个候选人

现在我在该表中添加了新表candidate_full_text我在sqlserver 2000中配置了全文索引现在我想使用NHibernate DetachedCriteria进行查询,如下所示

1) Select candidate with some filters

2) Execute the function ContainsTable for candidate_full_text table 
 (which returns candidate tables id as key and rank of occurrence of the search string)

3) join the result from 1 & 2

4) Apply paging criteria (ie return 1st 100,2nd 100,3rd 100.. etc) according to page no

5) return the result by order of rank column (which is return by ContainsTable)
Run Code Online (Sandbox Code Playgroud)

以下我在使用DetachedCriteria进行单一查询时必须做的事情而候选候选表的关键列是候选表id.这里我给出了1)候选(Min字段)的表模型

Id …

c# sql-server nhibernate lucene.net full-text-search

5
推荐指数
1
解决办法
3152
查看次数