Hi All,
I am able to search with in a path for multiple properties with OR condition group predicate (Search with path if prop1 or prop2 exists)
But the correct syntax is not known for multiple paths and properties (Search with path1 or path2 if prop1 or prop2 exists). Reference document for predicates gives a way to specify nested groups but for multiple properties not sure.
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
Any pointers would be helpful. Thank you.
Sandeep
Solved! Go to Solution.
you can divide your search criteria into multiple groups, let's say group1 for the property, group2 for path and group3 for type
and apply AND group operation.
Please check below query :
group.1_group.1_property=color
group.1_group.1_property.operation= exists
group.1_group.2_property=font
group.1_group.2_property.operation= exists
group.1_group.p.or=true
group.2_group.1_path=/content/geometrixx/en
group.2_group.2_path=/content/dam/geometrixx
group.2_group.p.or=true
group.3_group.1_type=cq:Page
group.3_group.2_type=dam:Asset
group.3_group.p.or=true
group.p.and=true
Lokesh - a top AEM Community member - addresses correct way to handle this use case here: Best practice to query JCR data using QueryBuilder API
you can divide your search criteria into multiple groups, let's say group1 for the property, group2 for path and group3 for type
and apply AND group operation.
Please check below query :
group.1_group.1_property=color
group.1_group.1_property.operation= exists
group.1_group.2_property=font
group.1_group.2_property.operation= exists
group.1_group.p.or=true
group.2_group.1_path=/content/geometrixx/en
group.2_group.2_path=/content/dam/geometrixx
group.2_group.p.or=true
group.3_group.1_type=cq:Page
group.3_group.2_type=dam:Asset
group.3_group.p.or=true
group.p.and=true