index
search
Jahia 7.3
Jahia 8
Customize Excerpt
Question
How can fields be excluded from excerpt (in search results)?
Answer
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>
</index-rule>
It is also recommended to add this property "<property useInExcerpt="false">j:keywords</property>" on existing rules.