I have to do Full text search in NHibernate
For following operation previously I am using Lucene.Net
I have a table called candidate
For full text query Lucene will return all candidate Id from lucene index and form that id I put in query in candidate and return the result
But the problem is there is more than 10 Lack of candidate resume available so Lucene is very slow because filter value from 10 Lk row and put return value for in query against candidate and again filter candidate is taking too much time
Also i have a paging criteria and for each page i return 100 candidates
now i added new table candidate_full_text in that table i configured full text index in sqlserver 2000 now i want to query using NHibernate DetachedCriteria as follows
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)
Following things i have to do in single query with DetachedCriteria And the key column for candidate_full_text index is candidate tables id.. Here i given table models of 1)candidate (Min fields)
Id - int ,
Name - varchar,
Dob - datetime,
2)candidate_full_text
id - int,
candidate_resume_full_text -ntext,(configured fulltext index)
candidate_id - int