Highlighted

Query Builder Search | Multiple Paths | Single Property & Multiple Values

Avatar

Avatar

krish747

Avatar

krish747

krish747

14-02-2019

Could anyone please tell me how can I search for the following using Query Builder?

1. Multiple Paths (With OR Condition)

2. Single Property

3. Multiple Values (for the above mentioned Property) (With OR Condition)

For instance,

Path = /content/abc/a, /content/abc/xyz/x

property = sling:resourceType

value.1=/training/content/title

value.2=//training/content/header

Replies

Highlighted

Avatar

Avatar

Gaurav-Behl

MVP

Total Posts

1.1K

Likes

226

Correct Answer

281

Avatar

Gaurav-Behl

MVP

Total Posts

1.1K

Likes

226

Correct Answer

281
Gaurav-Behl
MVP

14-02-2019

try this --

type=cq:Page

p.limit=-1

group.p.or=true

group.1_path=/content/we-retail/us/en/products/men

group.2_path=/content/wknd/

property=jcr:content/sling:resourceType

property.1_value=wknd/components/structure/page

property.2_value=weretail/components/structure/page

OR

(

  /jcr:root/content/we-retail/us/en/products/men//element(*, cq:Page)

  [

  ((jcr:content/@sling:resourceType = 'weretail/components/structure/page' or jcr:content/@sling:resourceType = 'wknd/components/structure/page'))

  ]

|

  /jcr:root/content/wknd//element(*, cq:Page)

  [

  ((jcr:content/@sling:resourceType = 'weretail/components/structure/page' or jcr:content/@sling:resourceType = 'wknd/components/structure/page'))

  ]

)

Highlighted

Avatar

Avatar

krish747

Avatar

krish747

krish747

16-02-2019

Thanks for your help!

Highlighted

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

16-02-2019

We are running this months ATCE on this subject with bsloki

I strongly recommend that you sign up -- Scott's Digital Community: [Webinar | February ] Ask the AEM Community Expert: Best practice to quer...