Sorry, the query element is
QueryBuilder qb = fts.getSearchFactory().buildQueryBuilder() .forEntity(WallPost.class).get(); [...] qb.keyword().onField("sponsor.profile.tag.id").matching(trc.getTag().getId()).createQuery() [...] FullTextQuery ftq = fts .createFullTextQuery( mj.createQuery(), WallPost.class) .setProjection(ProjectionConstants.ID) .setResultTransformer(new ProjectionFirstResultTransformer()) .setFirstResult(start) .setMaxResults(max) ;
|