use of org.jboss.tools.hibernate.search.runtime.spi.ILuceneQuery in project jbosstools-hibernate by jbosstools.
the class AbstractHSearchService method search.
@Override
public List<Object> search(ISessionFactory sessionFactory, Class<?> entity, String defaultField, String analyzer, String request) {
IFullTextSession session = getFacadeFactory().createFullTextSession(sessionFactory);
IQueryParser queryParser = getFacadeFactory().createQueryParser(defaultField, getAnalyzerByName(analyzer));
ILuceneQuery luceneQuery = queryParser.parse(request);
IQuery query = session.createFullTextQuery(luceneQuery, entity);
return query.list();
}
Aggregations