use of org.hibernate.search.jpa.FullTextEntityManager in project wildfly by wildfly.
the class SearchBean method findByKeyword.
public List<Book> findByKeyword(String keyword) {
FullTextEntityManager fullTextEntityManager = Search.getFullTextEntityManager(em);
TermQuery termQuery = new TermQuery(new Term("title", keyword));
FullTextQuery fullTextQuery = fullTextEntityManager.createFullTextQuery(termQuery, Book.class);
return fullTextQuery.getResultList();
}
Aggregations