Versions Compared

Key

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

...

The following IndexerPlugins has been added in the [installDir]/config/spring/api/discovery.xml file

Additional indexing plugin to implement the CRIS browse system via SOLR

...

Additional indexing plugin to add resource type in human format readable to SOLR document used to cluster types in the global search

Code Block
languagexml
themeEclipse
<bean id="resourceTypeIndexer" class="org.dspace.app.cris.discovery.ResourceTypeSolrIndexer" />

...

When a generic search is performed in DSpace-CRIS all the entities and the information available in the system are queried. The result are aggregated by type. Inside each type the result are sorted by relevance. The types are defined special facet is defined 

...

by a special facet containing the values as derived from the configuration in  [installDir]/config/modules/cris.cfg

 

 

all the configuration are in the format

 

Code Block
languagexml
themeEclipse
facet.type.<entity> = Value to store in the SOLR document in the format sortvalue\n|||\nDisplayed value###authority

the authority is the key of the Discovery configuration map to use when the search is restricted or the results limited to a specific entity.

Entity can be one of item, community, collection, crisrp, crispj, crisou

 

Code Block
languagexml
themeEclipse
facet.type.item = 001publications\n|||\nPublications###publications
facet.type.community = 007communities\n|||\nCommunities###community
facet.type.collection = 006collections\n|||\nCollections###collection
facet.type.crisrp = 009researchers\n|||\nResearcher profiles###researcherprofiles
facet.type.crispj = 010projects\n|||\nFundings###fundings
facet.type.crisou = 008orgunits\n|||\nOrganizations###orgunits

For additional entities, 2nd level CRIS object (ResearchObject), the shortname of the entity prefixed with crisdo. is used (i.e. crisdo.crisprize)

 

Code Block
languagexml
themeEclipse
##You can define a clustered type for other research object or set a fine granularity configuration custom - use @label@ to use default behaviours (<typedefinitionlabellowercase>|||<typedefinitionlabel>)
facet.type.crisdo.default = others\n|||\nOthers###crisothers
#facet.type.crisdo.crisprize = prize\n|||\nHonours, Awards and Prizen###crisprizefacet.type.crisdo.crisjournals = @label

It is also possible to create "virtual" defined entity from DSpace item on a dc.type (or other metadata) basis

The exact metadata to use is defined by

 

Code Block
languagexml
themeEclipse
global.item.typing = dc.type

the metadata value, lowercase, whitespace stripped is used as "entity" in the previous configuration properties, i.e.

 

Code Block
languagexml
themeEclipse
facet.type.thesis = 005theses\n|||\nTheses###theses
facet.type.patents = 004patents\n|||\nPatents###patents
facet.type.dataset = 003dataset\n|||\nDatasets###datasets
facet.type.conferenceproceeding = 002conferencematerials\n|||\nConference Materials###conferencematerials
facet.type.conferencepaper = 002conferencematerials\n|||\nConference Materials###conferencematerials
facet.type.presentation = 002conferencematerials\n|||\nConference Materials###conferencematerials
facet.type.poster = 002conferencematerials\n|||\nConference Materials###conferencematerials

Result rendering and highlighting

The result of a global search are displayed using a new DSpace Tag, dspace:discovery-artifact, that show each entry as a list item with a heading and a description. Using spring beans it is possible to customize which fields are displayed for each result, both in the heading than in the description. For each field it is possible to decide if the information are always shown or included it only when in this specific field there is a match with the searched terms.

The default configuration is defined in the [installDir]/config/spring/api/discovery-global.xml

Code Block
languagexml
themeEclipse
<bean name="global"
		class="org.dspace.discovery.configuration.DiscoveryViewAndHighlightConfiguration">
		<property name="viewConfiguration">						
			<map>
				<entry key="community">
					<bean
						class="org.dspace.discovery.configuration.DiscoveryViewConfiguration">
					...							

for each entity type, as defined in the global search, it is possible to specify a separate configuration

Code Block
languagexml
themeEclipse
<bean
	class="org.dspace.discovery.configuration.DiscoveryViewConfiguration">				
	<property name="metadataHeadingFields">								
		<list>
			<bean
				class="org.dspace.discovery.configuration.DiscoveryViewFieldConfiguration">
				<property name="mandatory" value="true"/>
				<property name="preHtml" value="&lt;h4 class='text-primary'&gt;" />
				<property name="postHtml" value="&lt;/h4&gt;" />
				<property name="field" value="name" />
				<property name="decorator" value="title" />
			</bean>
		</list>
	</property>
	<property name="metadataDescriptionFields">
		<list>
			<bean
				class="org.dspace.discovery.configuration.DiscoveryViewFieldConfiguration">
				<property name="field" value="dc.description.abstract" />
				<property name="preHtml" value="&lt;span&gt;" />
				<property name="postHtml" value="&lt;/span&gt;" />
			</bean>
		</list>
	</property>
</bean>	

Examples

Add facets to all Communities' or Collections' Browse boxes

The default Browse box that is displayed when viewing a community includes five buttons that determine what will be displayed in the browse list: Issue Date, Author, Title, Subject and Department.

The contents of these browse-lists depend on indexes that are configured in dspace.cfg with the webui.browse.index.<n> label:

Code Block
webui.browse.index.1 = dateissued:item:dateissued
webui.browse.index.2 = author:metadata:dc.contributor.*,dc.creator:text
webui.browse.index.3 = title:item:title
webui.browse.index.4 = subject:metadata:dc.subject.*:text
webui.browse.index.5 = rpname:crisrp:rpname
webui.browse.index.6 = rpdept:metadata:crisrp.dept:text
webui.browse.index.7 = pjtitle:crisproject:crisproject
webui.browse.index.8 = ouname:crisou:ouname
webui.browse.index.9 = itemdept:metadata:crisitem.author.dept:text
webui.browse.index.10 = type:metadata:dc.type:text

The buttons displayed in the Browse boxes of the communities and collections are determined by the webui.browse.community.index and webui.browse.collection.index fields:

Code Block
webui.browse.community.index = 1,2,3,4,9
webui.browse.collection.index = 1,2,3,4,9

Accordingly, the Issue Date, Author, Title, Subject and Department buttons are displayed in the communities and collections Browse boxes.

Assuming your metadata has an appropriate field defined, it can be used to populate an additional index, which can then be viewed using a Browse button. This example will demonstrate adding a 'Submit Date' button.

First add the webui.browse.index with an appropriate sequential number:

Code Block
webui.browse.index.11 = dateaccessioned:item:dateaccessioned

Next, add that number to the community and/or collection indexes:

Code Block
webui.browse.community.index = 1,2,3,4,9,11
webui.browse.collection.index = 1,2,3,4,9,11

Restart Tomcat, then recreate the discovery indexes to populate them with data from the dc.date.accessioned field:

Code Block
bin/dspace index-discovery -b -f

Add links to the Browse section in the Research Outputs page

The default Research Outputs Browse list consists of the following facets: Department, Author, Title, Type, Issue Date, and Subject. It is possible to add any already defined indexes to this list.

The contents of the list is specified in config/spring/cris/cris-processor.xml:

Code Block
        <bean class="org.dspace.app.webui.cris.components.ExploreMapProcessors" id="org.dspace.app.webui.cris.components.ExploreMapProcessors">
                <property name="processorsMap">
                        <map>
                                <entry key="publications">
                                        <list>
                                                <bean class="org.dspace.app.webui.cris.components.BrowseProcessor">
                                                        <property name="browseNames">
                                                                <list>
                                                                        <value>itemdept</value>
                                                                        <value>author</value>
                                                                        <value>title</value>
                                                                        <value>type</value>
                                                                        <value>dateissued</value>
                                                                        <value>subject</value>
                                                                </list>
                                                        </property>
                                                </bean>

Additional facets can be added to the list, using the name defined in the index (discussed in the 'Add facets to all Communities' or Collections' Browse boxes' example):

Code Block
                                                                <list>
                                                                        <value>itemdept</value>
                                                                        <value>author</value>
                                                                        <value>title</value>
                                                                        <value>type</value>
                                                                        <value>dateissued</value>
                                                                        <value>subject</value>
                                                                        <value>dateaccessioned</value>
                                                                </list>

Restart Tomcat for the changes to take effect.