index search Jahia 7.3 Jahia 8

Customize Excerpt


How can fields be excluded from excerpt (in search results)?


You can define an own index rule which excludes specific fields from the excerpt like (e.g. keywords shouldn't be part of excerpt):

    <index-rule nodeType="nt:base">
        <property useInExcerpt="false">j:keywords</property>
        <property isRegexp="true">.*:.*</property>

It is also recommended to add this property "<property useInExcerpt="false">j:keywords</property>" on existing rules.