Here we have some example queries:
https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/querybuilder-api.html
This example:
http://localhost:4502/bin/querybuilder.json?type=cq:Page&orderby=@jcr:content/cq:lastModified
returns things like this:
Questions:
Solved! Go to Solution.
Views
Replies
Total Likes
Hey @TB3dock,
The query(xpath) you shared is : //element(*, cq:Page)
order by jcr:content/@cq:lastModified
you are actually searching at the root level, i.e /
the results it has returned are 7665 in my case. also It has displayed/presented only 10 results to you(rest are there in hits count). Add this - p.limit=-1 and you'll be able to see al the results on the same page:
now to your questions:
Q1. None of the results are actually pages from the site? The site we have locally is the wknd starter site. How do you return pages from the site hosted in AEM?
A1. Because you are searching at root (/) these are all cq:Page results, but in order to get specific results from your site, you need to specify your specific project path(like path=/content/we-retail). This is the way you return the intended pages from your AEM instance.
Q2. type=cq:Page what other types are available? Is this the type of the items searched, or the type of the items returned?
A2. There are other node types as well. such as dam:Asset, nt:unstructured, etc. please visit this URL: http://localhost:4502/crx/explorer/nodetypes/index.jsp and you'll find all the registered node types you can query on.
I hope that helps
Thanks,
Bilal.
Here is the list of all the primary types available in AEM
If you want to return the specific set of pages with the following sample query
path=/content/game
type=cq:page
property=cq:primaryType
property.value=sample/components/structure/game-overview
p.limit=-1
Please go through https://hashimkhan.in/aem-adobecq5-code-templates/query-builder/ to learn more about querybuilder and available predicates and possibilities to achieve using the query builder
Hi @TB3dock,
Use this http://localhost:4502/bin/querybuilder.json?type=cq:Page&orderby=@jcr:content/cq:lastModified&p.limi..., you will see the entire result set/resources of type cq:Page
By default, 10 results are returned. If you specifiy "p.limit=-1", it will bring in entire matching/applicable results.
Answer to your queries inline in bold.
Questions:
Hey @TB3dock,
The query(xpath) you shared is : //element(*, cq:Page)
order by jcr:content/@cq:lastModified
you are actually searching at the root level, i.e /
the results it has returned are 7665 in my case. also It has displayed/presented only 10 results to you(rest are there in hits count). Add this - p.limit=-1 and you'll be able to see al the results on the same page:
now to your questions:
Q1. None of the results are actually pages from the site? The site we have locally is the wknd starter site. How do you return pages from the site hosted in AEM?
A1. Because you are searching at root (/) these are all cq:Page results, but in order to get specific results from your site, you need to specify your specific project path(like path=/content/we-retail). This is the way you return the intended pages from your AEM instance.
Q2. type=cq:Page what other types are available? Is this the type of the items searched, or the type of the items returned?
A2. There are other node types as well. such as dam:Asset, nt:unstructured, etc. please visit this URL: http://localhost:4502/crx/explorer/nodetypes/index.jsp and you'll find all the registered node types you can query on.
I hope that helps
Thanks,
Bilal.
Views
Replies
Total Likes
Hey @TB3dock, first login using this URL: http://localhost:4502/crx/explorer/index.jsp
and then click on 'Node Type Administration', that will take you to the place you wanted.
Thanks!
Bilal.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Like
Replies