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

Avatar

Avatar
Validate 1
Level 2
krish747
Level 2

Likes

3 likes

Total Posts

7 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile

Avatar
Validate 1
Level 2
krish747
Level 2

Likes

3 likes

Total Posts

7 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile
krish747
Level 2

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

Avatar

Avatar
Boost 250
MVP
Gaurav-Behl
MVP

Likes

250 likes

Total Posts

1,147 posts

Correct reply

283 solutions
Top badges earned
Boost 250
Establish
Give back 300
Give Back 50
Give Back 5
View profile

Avatar
Boost 250
MVP
Gaurav-Behl
MVP

Likes

250 likes

Total Posts

1,147 posts

Correct reply

283 solutions
Top badges earned
Boost 250
Establish
Give back 300
Give Back 50
Give Back 5
View profile
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'))

  ]

)

Avatar

Avatar
Validate 1
Level 2
krish747
Level 2

Likes

3 likes

Total Posts

7 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile

Avatar
Validate 1
Level 2
krish747
Level 2

Likes

3 likes

Total Posts

7 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile
krish747
Level 2

16-02-2019

Thanks for your help!

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

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...