Query Builder OOTB Servlet multiple paths and properties

Avatar

Avatar

sandeepk7656774

Avatar

sandeepk7656774

sandeepk7656774

30-04-2019

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)

http://localhost:4502/bin/querybuilder.json?path=/content/app/path&group.p.or=true&group.1_property=...

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

30-04-2019

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

Answers (1)

Answers (1)

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

30-04-2019

Lokesh - a top AEM Community member - addresses correct way to handle this use case here: Best practice to query JCR data using QueryBuilder API