I'm trying to do the same query...
Code:
Criteria c = filter.processCriteria(fullTextSession.createCriteria(Page.class,"p"));
Criteria c2 = filter.processCriteria(fullTextSession.createCriteria(Page.class));
total = fullTextSession.createFullTextQuery(luceneQuery)
.setCriteriaQuery(c2).list().size();
List pages = fullTextSession
.createFullTextQuery(luceneQuery)
.setCriteriaQuery(c)
.setFirstResult(startIndex-1)
.setMaxResults(count)
.list();
I'm really surprised of this, because if I remove setCriteriaQuery from the Query, setMaxResults works properly, but If I keep it, the resultset was cut at count-1 elements...
The total resultset size is 10, and I put startIndex to 1, count = 6, and the queries return two pages of results with 5 elements each one...
Can anybody help??
Thank you in advance[/code]