Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

QueryBuilder to extract specific nodes based on jcr:lastmodified

Avatar

Level 10

Hello,

Is there a way to pick up nodes of specific resource types eg:foundation/components/text and test/components/textCustom, under a specific path, /content/Test/en_US, and retrieve the ones modified in past 2 days?

Please let me know.

Regards,

NZ

1 Accepted Solution

Avatar

Correct answer by
Level 7

You could also use this:
 

map.put("relativedaterange", "@jcr:content/cq:lastModified"); map.put("relativedaterange.lowerBound", "-2d");

for changes made in the last two days 🙂

Good Luck
/Johan

4 Replies

Avatar

Level 10

The QueryBuilder API is built on JCR API. Having said that -- see this thread that talks about your use case:

http://jackrabbit.510166.n4.nabble.com/Querying-for-all-modified-nodes-based-on-jcr-lastModified-td5...

HTH

Avatar

Level 10

Thanks Scott, had figured it out earlier, appreciate help.

daterange.property=jcr:lastModified
daterange.property.and=true
daterange.lowerBound=2013-09-09
daterange.lowerOperation= >=
daterange.upperBound =2013-09-14

 

Regards,

Nicole

Avatar

Correct answer by
Level 7

You could also use this:
 

map.put("relativedaterange", "@jcr:content/cq:lastModified"); map.put("relativedaterange.lowerBound", "-2d");

for changes made in the last two days 🙂

Good Luck
/Johan

Avatar

Level 2

hi,

 

I want to search for assets in the whole Dam just excluding a folder(read expired folder). how can i achieve it.. 

 

please help.

thank you.