new StandardAnalyzer(Version.LUCENE_29));
org.apache.lucene.search.Query textQuery = parser.parse(queryText);
FullTextQuery ftQuery =
entityManager.createFullTextQuery(textQuery,
HGlossaryTerm.class);
ftQuery.enableFullTextFilter("glossaryLocaleFilter").setParameter(
"locale", srcLocale);
ftQuery.setProjection(FullTextQuery.SCORE, FullTextQuery.THIS);
@SuppressWarnings("unchecked")
List<Object[]> matches =
ftQuery.setMaxResults(maxResult).getResultList();