Recently I’ve been working with Adobe CQ5 (AEM). Specifically I’ve been looking at how to change where the content or excerpt of search results comes from in the node structure.
The default property names of where excerpts are extracted from can be found in your local repository at the following URL
By default there are a number of properties defined. Typically these are “text” and “jcr:description”. In my case I needed to add a new property that can be used for content excerpts, this was a property called “bodyText”.
To do this automatically through a code release I added the following file into my code base that is getting bundled up. The file gets deployed to the following location
with the filename
in my code base.
The content of the file has the following in it
<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OsgiConfig" excerpt.properties="[bodyText,jcr:description,text]" />
Once deployed you should be able to see the content of your excerpt properties using the URL given above.
For more information have a look at the following link: