Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This file is in XML format, you .  You should be familiar with XML before editing this file. The configurations are organized together in beans, depending on the purpose these properties are used for.
This purpose can be derived from the class of the beans. Here's a short summary of classes you will encounter throughout the file and what the corresponding properties in the bean are used for.

...

Class:

DiscoveryConfigurationService

Purpose:

Defines the mapping between separate Discovery configurations and individual collections/communities

Default:

All communities, collections and the homepage (key=default) are mapped to defaultConfiguration, also .  Also controls the metadata fields that should not be indexed in the search core (item provenance for example).

Class:

DiscoveryConfiguration

Purpose:

Groups configurations for sidebar facets, search filters, search sort options and recent submissions

Default:

There is one configuration by default called defaultConfiguration

Class:

DiscoverySearchFilter

Purpose:

Defines that specific metadata fields should be enabled as a search filter

Default:

dc.title, dc.contributor.author, dc.creator, dc.subject.* and dc.date.issued are defined as search filters

Class:

DiscoverySearchFilterFacet

Purpose:

Defines which metadata fields should be offered as a contextual sidebar browse options, each of these facets has also got to be a search filter

Default:

dc.contributor.author, dc.creator, dc.subject.* and dc.date.issued

Class:

HierarchicalSidebarFacetConfiguration

Purpose:

Defines which metadata fields contain hierarchical data and should be offered as a contextual sidebar option

Class:

DiscoverySortConfiguration

Purpose:

Further specifies the sort options to which a DiscoveryConfiguration refers

Default:

dc.title and dc.date.issued are defined as alternatives for sorting, other than Relevance (hard-coded)

Class:

DiscoveryHitHighlightingConfiguration

Purpose:

Defines which metadata fields can contain hit highlighting & search snippets

Default:

dc.title, dc.contributor.author, dc.subject, dc.description.abstract & full text from text files.

Class:

TagCloudFacetConfiguration

Purpose:Defines the tag cloud appearance configuration bean and the search filter facets to appear in the tag cloud form. You can have different "TagCloudFacetConfiguration" per community or collection or the home page

...

Sidebar facets extend the search filter and add some extra properties to it, below .  Below is an example of a search filter that is also used as a sidebar facet.

...

Note that the class has changed from DiscoverySearchFilter to SidebarFacetConfiguration this .  This is needed to support the extra properties.

  • facetLimit (optional): The maximum number of values to be shown. This property is optional, if none is specified the default value "10" will be used. If the filter has the type date, this property will not be used since dates are automatically grouped together.
  • sortOrder (optional):The sort order for the sidebar facets, it can either be COUNT or VALUE. The default value is COUNT.
    • COUNT Facets will be sorted by the amount number of times they appear in the repository
    • VALUE Facets will be sorted alphabetically
  • type(optional): the type of the sidebar facet it can either be "date" or "text", "text" is the default value.
    • text: The facets will be treated as is
    • date: Only the year will be stored in the Solr index. These years are automatically displayed in ranges that get smaller when you select one.

...

Discovery supports specialized drill down in hierarchically structured metadata fields. For this drill down to work, the metadata in the field for which you enable this must be composed out of terms, divided by a splitter. For example, you could have a dc.subject.taxonomy field in which you keep metadata like "CARTOGRAPHY::PHOTOGRAMMETRY", in which Cartography and Photogrammetry are both terms, divided by the splitter "::". The Initially the sidebar will only display the top level facets, when .  When clicking on "view more" all the facet options will be displayed.

...

Note that the class has changed from SidebarFacetConfiguration to HierarchicalSidebarFacetConfiguration this .  This is needed to support the extra properties.

...

Code Block
langxml
<bean id="sortTitle" class="org.dspace.discovery.configuration.DiscoverySortFieldConfiguration">
        <property name="metadataField" value="dc.title"/>
        <property name="type" value="text"/>
 </bean>

The id & and class attributes are mandatory for this type of bean. The properties that it contains are discussed below.

...

The DiscoveryConfiguration Groups groups configurations for sidebar facets, search filters, search sort options and recent submissions. If you want to show the same sidebar facets, use the same search filters, search options and recent submissions everywhere in your repository, you will only need one DiscoveryConfiguration and you might as well just edit the defaultConfiguration.

...

A DiscoveryConfiguration consists out of five six parts:

  • The list of applicable sidebarFacets
  • The list of applicable searchFilters
  • The list of applicable searchSortFields
  • Any default filter queries (optional)
  • The configuration for the Recent submissions display
  • The configuration of the tag cloud facet

...

  • defaultSort (optional): The default field on which the search results will be sorted, this .  This must be a reference to an existing search sort field bean. If none is given relevance will be the default. Sorting according to the internal relevance algorithm is always available, even though it's not explicitly mentioned in the sortFields section.
  • defaultSortOrder (optional): The default sort order can either be asc or desc.
  • sortFields (mandatory): The list of available sort options, each element in this list must link to an existing sort field configuration bean.

...

Default filter queries are applied on all search operations & sidebarfacet and sidebar facet clicks. One useful application of default filter queries is ensuring that all returned results are items. As a result, subcommunities and collections that are returned as results of the search operation, are filtered out.
Similar to the lists above, the default filter queries are defined as a list. They are optional.

...

Code Block
langxml
<property name="recentSubmissionConfiguration">
    <bean class="org.dspace.discovery.configuration.DiscoveryRecentSubmissionsConfiguration">
        <property name="metadataSortField" value="dc.date.accessioned"/>
        <property name="type" value="date"/>
        <property name="max" value="5"/>
    </bean>
</property>

The property name & and the bean class are mandatory. The property field property field names are discusses below.

...

Code Block
languagehtml/xml
<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"/>
                    <!-- Max number of characters to display around the matching word (Warning setting to 0 returns entire field) -->
                    <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">
					<!-- Displays snippets from indexed full text of document (for supported formats) -->
                    <property name="field" value="fulltext"/>
                    <!-- Max number of characters to display around the matching word (Warning setting to 0 returns entire field) -->
                    <property name="maxSize" value="250"/>
					<!-- Max number of snippets (matching words) to show -->
                    <property name="snippets" value="2"/>
                </bean>
            </list>
        </property>
    </bean>
</property>

The property name & and the bean class are mandatory. The property field property field names are:

  • field (mandatory): The metadata field to be highlighted (can also be * if all the metadata fields should be highlighted).
  • maxSize (optional): Limit the number of characters displayed to only the relevant part (use metadata field as search snippet).
  • snippets (optional): The maximum number of snippets that can be found in one metadata field.

...

Code Block
languagehtml/xml
<property name="moreLikeThisConfiguration">
    <bean class="org.dspace.discovery.configuration.DiscoveryMoreLikeThisConfiguration">
        <property name="similarityMetadataFields">
            <list>
                <value>dc.title</value>
                <value>dc.contributor.author</value>
                <value>dc.creator</value>
                <value>dc.subject</value>
            </list>
        </property>
        <!--The minimum number of matching terms across the metadata fields above before an item is found as related -->
        <property name="minTermFrequency" value="5"/>
        <!--The maximum number of related items displayed-->
        <property name="max" value="3"/>
        <!--The minimum word length below which words will be ignored-->
        <property name="minWordLength" value="5"/>
    </bean>
</property>

The property name & and the bean class are mandatory. The property field property field names are discussed below.

...