Expand my Community achievements bar.

SOLVED

AEM Query

Avatar

Level 4

Hi Team

I have a requirement where i need to execute query to retrieve the below data.

 

Query Equivalent:-

Select page_url, published_datw,title,tags,(both on the Basic tab), content_type, content_format, category, sub-categories, article_read_time, (all on the Article Properties tab) secondary_meta_keywords, noindex, nofollow.

I have run the below query but its only gave page path, name, title and last modified date and created date but i want published date too that's why added property=@jcr:content/cq:lastReplicated.

http://localhost:4502/bin/querybuilder.json?path=/content&1_property=@jcr:content/cq:lastReplicateAc...

Regards

Seema Kumari

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

try with query like below

type=cq:Page
path=/content/we-retail/us/en/products/equipment/running
orderby.sort=desc
orderby=@jcr:content/jcr:title
p.hits=selective
p.properties=jcr:path jcr:content/jcr:title jcr:content/cq:lastReplicated
p.limit=-1

Respectively to above query builder servlet path

 

http://localhost:4502/bin/querybuilder.json?orderby=%40jcr%3acontent%2fjcr%3atitle&orderby.sort=desc... 



Arun Patidar

View solution in original post

5 Replies

Avatar

Community Advisor

Hi @skumari1 ,

 

What you're looking for is technically a report . 

And then you can add a query in the report and get the desired fields:

https://adobe-consulting-services.github.io/acs-aem-commons/features/report-builder/index.html 

Avatar

Level 4

Hi @Anmol_Bhardwaj 

After clicking on the link given in the doc i.e,  /etc/acs-commons/reports.html 

It's giving 404 error. Do I need to install any package to open this console?

Regards

Seema Kumari

 

Avatar

Community Advisor

Hi @skumari1 ,

If you are looking for a report as @Anmol_Bhardwaj  mentioned, yes you need to have acs-commons to instance.
(you can download the package or add a dependency to your project for ACS Commons, check this link: https://github.com/Adobe-Consulting-Services/acs-aem-commons/releases )

But if you are looking to retrieving the date for development purpose, you might need write a sling model where you can retrieve all the above mentioned data either through a value map or through query builder API.

Thanks,

Sravan

 

 

Avatar

Correct answer by
Community Advisor

Hi,

try with query like below

type=cq:Page
path=/content/we-retail/us/en/products/equipment/running
orderby.sort=desc
orderby=@jcr:content/jcr:title
p.hits=selective
p.properties=jcr:path jcr:content/jcr:title jcr:content/cq:lastReplicated
p.limit=-1

Respectively to above query builder servlet path

 

http://localhost:4502/bin/querybuilder.json?orderby=%40jcr%3acontent%2fjcr%3atitle&orderby.sort=desc... 



Arun Patidar