Class PredicateGroupEvaluator

  • All Implemented Interfaces:
    PredicateEvaluator
    Direct Known Subclasses:
    SavedQueryPredicate

    public class PredicateGroupEvaluator
    extends AbstractPredicateEvaluator
    Allows to build nested conditions. Groups can contain nested groups. Everything in a querybuilder query is implicitly in a root group, which can have p.or and p.not as well.

    Example for matching either one of two properties against a value: group.p.or=true group.1_property=jcr:title group.1_property.value=My Page group.2_property=navTitle group.2_property.value=My Page This is conceptually (1_property OR 2_property).

    Example for nested groups: fulltext=Management group.p.or=true group.1_group.path=/content/geometrixx/en group.1_group.type=cq:Page group.2_group.path=/content/dam/geometrixx group.2_group.type=dam:Asset This searches for the term "Management" within pages in /content/geometrixx/en or in assets in /content/dam/geometrixx. This is conceptually fulltext AND ( (path AND type) OR (path AND type) ). Be aware that such OR joins need good indexes for performance.

    Name:

    group

    Properties:

    p.or
    if set to "true", only one predicate in the group must match (defaults to "false", meaning all must match)
    p.not
    if set to "true", negates the group (defaults to "false")
    <predicate>
    add nested predicates
    N_<predicate>
    add multiple nested predicates of the same time, e.g. 1_property, 2_property, ...
    Since:
    5.2