Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor corrections to facet docs

...

Code Block
langxml
<bean id="searchFilterTitle" class="org.dspace.discovery.configuration.DiscoverySearchFilter">
    <property name="indexFieldName" value="title"/>
    <property name="metadataFields">
        <list>
            <value>dc.title</value>
        </list>
    </property>
    <property name="pageSize" value="10"/>
</bean>

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

...

Code Block
langxml
<bean id="searchFilterAuthor" class="org.dspace.discovery.configuration.SidebarFacetConfigurationDiscoverySearchFilterFacet">
        <property name="indexFieldName" value="author"/>
        <property name="metadataFields">
            <list>
                <value>dc.contributor.author</value>
                <value>dc.creator</value>
            </list>
        </property>
        <property name="facetLimit" value="105"/>
        <property name="sortOrderSidebar" value="sortOrder"COUNT"/>
        <property name="sortOrderFilterPage" value="COUNT"/>
        <property name="isOpenByDefault" value="true"/>
        <property name="type" value="text"/>
    </bean>

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

  • facetLimit (optional): The maximum number of values to be shown by default. This property is optional, if none is specified the default value "10" will be used. If the filter has the type 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 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 (DEFAULT)
    • 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.

...