[Java] Can CriteriaQuery build multi-level request for ElasticSearch?

Hi,
I'm learning using Java maven elasticsearch-spring-data with CriteriaQuery for build my query.
But after tried it, and read source code builder on CriteriaQueryProcessor.java, I saw that only create query at first level.

Can CriteriaQuery build this query "WHERE f1="x" AND (f2="a" AND/OR f3="b")"?

some code example:
CriteriaQuery c = new CriteriaQuery(
new Criterial("f1").contains("x")
);
c.addCriteria(new Criteria("f2").contains("a").and("f3").contains("b"));

It only handle WHERE f1="x" AND f2="a"
(ignore mistake between "=" and "contains" operator in the example)

I think you should ask this in the spring data forums instead.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.