Versions Compared

Key

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

...

See the "Browse Index Configuration" section of the Configuration Reference for all "Browse By" configurations.  These Configurations control both which fields are indexed for browsing, as well as which Browse by options appear in the user interface.  Changing these configurations requires reindexing.

If you add new browse fields then you should coordinate changes here with the message catalog(s) in the UI.  You will need to add several entries:

keyvalue
browse.comcol.by.*label the browse field in the Browse menu of a community or collection page
menu.section.browse_global_by_*label the browse field in the "browse" dropdown at the top of the page
browse.metadata.*label the browse field in the body of the browsing page
browse.metadata.*.breadcrumbslabel the browse field in the page's "breadcrumb trail"

Modifying the Discovery User Interface (config/spring/api/discovery.xml)

...

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="COUNT"/>
        <property name="sortOrdersortOrderFilterPage" 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.

...

Command used:

[dspace]/bin/dspace index-discovery [-cbhf[r <item handle>]]

Java class:

org.dspace.discovery.IndexClient

Arguments (short and long forms):

Description


called without any options, will update/clean an existing index

-b

(re)build index, wiping out current one if it exists

-c

clean existing index removing any documents that no longer exist in the db

-f

if updating existing index, force each handle to be reindexed even if uptodate

-h

print this help message

-i <object handle>Reindex an individual object (and any child objects).  When run on an Item, it just reindexes that single Item. When run on a Collection, it reindexes the Collection itself and all Items in that Collection. When run on a Community, it reindexes the Community itself and all sub-Communities, contained Collections and contained Items.

-r <item <object handle>

remove an Item, Collection or Community from index based on its handle

-sRebuild the spellchecker, can be combined with -b and -f.

...