1- add the field to indeing
edit the files dspace.cfg
The search commands are written as “search.index.# = [name]:[schema].[element].[qualifier]”
add the field in this section
changing these will change your search results
search.index.6 = abstract:dc.description.abstract
2- add the field text in
i18n/messages.xml
like
<message key=”xmlui.ArtifactBrowser.AdvancedSearch.type_abstract”>abstract</message>
<message key=”xmlui.ArtifactBrowser.SimpleSearch.filter.abstract”>abstract</message>
3- Creating a new discovery bean
open the file
[Dspace]/config/spring/api/discovery.xml
add the new fitler field to this section
<
list
>
<
ref
bean
=
"searchFilterTitle"
/>
<
ref
bean
=
"searchFilterAuthor"
/>
<
ref
bean
=
"searchFilterSubject"
/>
<
ref
bean
=
"searchFilterAbstract"
/>
</
list
>
for facet add it in this section
<property name=”sidebarFacets”>
<list>
<ref bean=”searchFilterAuthor” />
<ref bean=”searchFilterSubject” />
<ref bean=”searchFilterPublisher” />
<ref bean=”searchFilterIssued” />
<ref bean=”searchFilterAbstract” />
<list>
<ref bean=”searchFilterAuthor” />
<ref bean=”searchFilterSubject” />
<ref bean=”searchFilterPublisher” />
<ref bean=”searchFilterIssued” />
<ref bean=”searchFilterAbstract” />
</list>
4- then create the field configuration beans
<!–Search filter configuration beans–>
<bean id=”searchFilterAbstract” class=”org.dspace.discovery.configuration.DiscoverySearchFilterFacet”>
<property name=”indexFieldName” value=”abstract”/>
<property name=”metadataFields”>
<list>
<value>dc.description.abstract</value>
</list>
</property>
</bean>
<bean id=”searchFilterAbstract” class=”org.dspace.discovery.configuration.DiscoverySearchFilterFacet”>
<property name=”indexFieldName” value=”abstract”/>
<property name=”metadataFields”>
<list>
<value>dc.description.abstract</value>
</list>
</property>
</bean>
5- reindex discovery and restart tomcat
./dspace index-discovery -f
service tomcat7 restart
Advertisements