I'm trying to find entities by their collection elements properties. I also need to get score from oracle text index. Here is my query code.
List<EntityWithNestedScore> fetch =
new BlazeJPAQuery<>(entityManager, criteriaBuilderFactory)
.select(entityWithNestedScore)
.from(entityWithNestedScore)
.leftJoin(
select(entityWithNestedScoreAddress)
.from(entityWithNestedScore.addresses, entityWithNestedScoreAddress)
.where(Expressions.booleanTemplate("contains(TXT_INDEX, 'ndata(Street, Poznańska) accum ndata(City, Zamość) accum ndata(House_no, 13) accum ndata(Flat_no, 7)', 1)>=1")), entityWithNestedScoreAddress)
.lateral()
.where(predicateForCheck)
.fetch();
After running code i get exception:
com.blazebit.persistence.parser.expression.SyntaxErrorException: No function or macro with the name 'contains' could not be found!
Is there a way to execute CONTAINS
function in where clause of subquery?