Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

How to search for page names that has the word 'archive' in it using Query Builder?

Avatar

Level 2

I have a lot of pages under /content path that has names like archive, archive1, archive-test, test-archive, etc.

I tried using the below Query Builder queries but it doesn't seem to work.

 

path=/content
nodename=archive

 

(and)

 

type=cq:Page
path=/content
group.property=nodename
group.property.value=archive
group.property.operation=like
p.limit=-1


Is there a way to find all the pages with names that has the text 'archive' in it?

1 Accepted Solution

Avatar

Correct answer by
Employee

This should work

 

path=/content
type=cq:Page
nodename=*archive*
operation=like

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @cprogramkarthick,

You can use wildcard in query to achieve your goal, like this:

 

path=/content
nodename=*archive*

 

Please also explore official predicates documentation for more information:

Avatar

Level 2

I tried doing as suggested with the below. It keeps searching and nothing is happening after that.

 

path=/content
nodename=*archive*

 

Will explore the suggested documentation on predicates. Thanks so much for the response

Avatar

Correct answer by
Employee

This should work

 

path=/content
type=cq:Page
nodename=*archive*
operation=like