Query the Content Repository
Test JCR queries by executing them directly in the Repository Servlet.
Supported Query Languages
Bloomreach Experience Manager's content repository supports the following query languages:
The repository provides a developer tool that can be used to experiment with querying the repository. This tool is commonly referred to as Repository Servlet and can be found at the following URL:
After you log in, you should see something similar to the following image.
If you log in as admin your query results may also contain get draft and unpublished document variants and document type prototypes.
The best place to start to learn more about the syntax and capabilities of the XPath query language is actually the JCR version 1.0 specification. You can read it here, section 6.6 covers XPath.
Below you find some example XPath queries.
Find all nodes of type hippo:document:
Find all nodes that have the property myproject:title with the value 'title':
Find all nodes of type hippo:document that have the text 'title':
//element(*, hippo:document)[jcr:contains(., 'title')]
Find all nodes of type hippo:document that have the text 'title' in the property myproject:title:
//element(*, hippo:document)[jcr:contains(@myproject:title, 'title')]
Find all the children of a node with spaces. Use @hippo:paths with the UUID of the folder:
Find all document types, except those that are in a specific folder "excludeme":
Find all published text documents and order them by their last modification date:
//element(*, myproject:textdocument)[hippostd:state = 'published' and hippostd:stateSummary = 'live'] order by @hippostdpubwf:lastModificationDate descending