All Versions
- DSpace 7.x (Current Release)
- DSpace 8.x (Unreleased)
- DSpace 6.x (EOL)
- DSpace 5.x (EOL)
- More Versions...
...
The hit highlighting configuration element contains all settings necessary to display search snippets & enable hit highlighting.
Warning |
---|
This paragraph section only applies to XMLUI. JSPUI does not currently support "highlighting & search snippets". |
The hit highlighting configuration element contains all settings necessary to display search snippets & enable hit highlighting.
Info | ||
---|---|---|
| ||
You can disable hit highlighting / search snippets by commenting out the entire Alternatively, you can also tweak which fields are shown in hit highlighting, or modify the number of matching words shown (snippets) and/or number of characters shown around the matching word (maxSize). For this change to take effect in the User Interface, you will need to restart Tomcat. |
Notewarning |
---|
Changes made to the configuration will not automatically be displayed in the user interface. By default, only the following fields are displayed: dc.title, dc.contributor.author, dc.creator, dc.contributor, dc.date.issued, dc.publisher, dc.description.abstract and fulltext. If additional fields are required, look for the "itemSummaryList" template. |
...
Code Block | ||
---|---|---|
| ||
<property name="hitHighlightingConfiguration"> <bean class="org.dspace.discovery.configuration.DiscoveryHitHighlightingConfiguration"> <property name="metadataFields"> <list> <bean class="org.dspace.discovery.configuration.DiscoveryHitHighlightFieldConfiguration"> <property name="field" value="dc.title"/> <property name="snippets" value="5"/> </bean> <bean class="org.dspace.discovery.configuration.DiscoveryHitHighlightFieldConfiguration"> <property name="field" value="dc.contributor.author"/> <property name="snippets" value="5"/> </bean> <bean class="org.dspace.discovery.configuration.DiscoveryHitHighlightFieldConfiguration"> <property name="field" value="dc.subject"/> <property name="snippets" value="5"/> </bean> <bean class="org.dspace.discovery.configuration.DiscoveryHitHighlightFieldConfiguration"> <property name="field" value="dc.description.abstract"/> <!-- Number of characters to display around the matching word --> <property name="maxSize" value="250"/> <!-- Max number of snippets (matching words) to show --> <property name="snippets" value="2"/> </bean> <bean class="org.dspace.discovery.configuration.DiscoveryHitHighlightFieldConfiguration"> <property name="field" value="fulltext"/> <property name="maxSize" value="250"/> <property name="snippets" value="2"/> </bean> </list> </property> </bean> </property> |
...