.forEntity(indexedClass).get();
}
@SuppressWarnings("unchecked")
protected Page<E> searchPage(Page<E> page, Query query) {
FullTextQuery fullTextQuery = getFullTextEntityManager()
.createFullTextQuery(query, indexedClass);
appendOrders(page, fullTextQuery);
if (page.getAutoCount()) {
page.setTotalCount((long) fullTextQuery.getResultSize());
page.setAutoCount(false);
}
//
fullTextQuery.setFirstResult(page.getFirst() - 1);
fullTextQuery.setMaxResults(page.getPageSize());
return page.setResult(fullTextQuery.getResultList());
}