user3916570
user3916570

Reputation: 778

CQ5 QueryBuilder if Property has a value or has no value

I am running a query like to do determine if the page has the given tag(s)

predicates.put("property","jcr:content/cq:tags");
predicates.put("property.and","true");
predicates.put("property.1_value","properties:style");
predicates.put("property.2_value","properties:style/color");

I also want to be able to get all results that have any tag or query on all results that have no tag.

What would I put in the value section to check for these constraints

Upvotes: 0

Views: 1196

Answers (1)

Markus
Markus

Reputation: 452

You need to set the operation parameter of the property predicate. Its semantic is described here: JcrPropertyPredicateEvaluator

Upvotes: 1

Related Questions