I am using 4.2.0.Final. When the lucene indexes
are out of sync with database entries (as a result of direct dml operations) , this code works fine --
Code:
FullTextEntityManager ftem = org.hibernate.search.jpa.Search.getFullTextEntityManager(entityManager);
FullTextQuery jpaQuery = ftem.createFullTextQuery(query, clazz);
List<T> result = jpaQuery.getResultList();
I get correct result set.
However, the following code with pagination properties doesn't work --
Code:
FullTextEntityManager ftem = org.hibernate.search.jpa.Search.getFullTextEntityManager(entityManager);
FullTextQuery jpaQuery = ftem.createFullTextQuery(query, clazz);
jpaQuery.setFirstResult(11);
jpaQuery.setMaxResults(10);
List<T> result = jpaQuery.getResultList();
The result set is null. Wanted to confirm if this is expected behavior. There may be occasional sync issues with the indexes.
Thanks,
Rajesh