Xml 要在dspace 4.x搜索筛选器方面添加自定义筛选器类型吗

Xml 要在dspace 4.x搜索筛选器方面添加自定义筛选器类型吗,xml,xslt,dspace,Xml,Xslt,Dspace,我使用的是dspace 4.x XMLUI版本。我想在发现搜索过滤器列表中添加新的过滤器类型,如“学习材料类型”、“教育程度”等(不在侧边栏方面)。我怎么做 在[dspace install dir]/config/spring/api/discovery.xml中,可以添加自定义搜索过滤器。例如,如果要为dc.type添加搜索筛选器,则应添加: <bean id="searchFilterType" class="org.dspace.discovery.configuration.Di

我使用的是dspace 4.x XMLUI版本。我想在发现搜索过滤器列表中添加新的过滤器类型,如“学习材料类型”、“教育程度”等(不在侧边栏方面)。我怎么做

在[dspace install dir]/config/spring/api/discovery.xml中,可以添加自定义搜索过滤器。例如,如果要为dc.type添加搜索筛选器,则应添加:

<bean id="searchFilterType" class="org.dspace.discovery.configuration.DiscoverySearchFilterFacet">
    <property name="indexFieldName" value="type"/>
    <property name="metadataFields">
        <list>
            <value>dc.type</value>
        </list>
    </property>
    <property name="type" value="text"/>
    <property name="sortOrder" value="VALUE"/>
</bean>
请注意,为了确保您的自定义邮件在下次重建时不会被覆盖,您应该在src树中存储和管理它:

[dspace source]/dspace/modules/xmlui/src/main/webapp/i18n/

我认为,要想完全成功,我们必须修改一些“messages.xml”文件。有人能帮我找到那些“messages.xml”文件吗?我真的希望你会问:)请看这个,我会更新我的答案。我已经完成了你说的所有事情,现在新添加的项目显示在搜索筛选器列表中,但格式是->“xmlui.ArtifactBrowser.SimpleSearch.filter.typeoflm”。但我想展示一下-->“学习材料的类型”。我在安装文件夹中做了所有更改,而不是在源代码中。您是否尝试重新启动tomcat并清除浏览器缓存?另外,在修改discovery.xml之后,不要忘记运行index discovery-b。有时,显示新消息所需的只是硬重启/刷新浏览器。您是否已将此
类型的学习材料添加到messages.xml中?
<ref bean="searchFilterType" />
        <list>
            <ref bean="searchFilterTitle" />
            <ref bean="searchFilterAuthor" />
            <ref bean="searchFilterSubject" />
            <ref bean="searchFilterIssued" />
            <ref bean="searchFilterType" />
        </list>
<bean id="homepageConfiguration" class="org.dspace.discovery.configuration.DiscoveryConfiguration" scope="prototype">
<entry key="site" value-ref="homepageConfiguration" />
<bean id="org.dspace.discovery.configuration.DiscoveryConfigurationService" class="org.dspace.discovery.configuration.DiscoveryConfigurationService">
    <message key="xmlui.ArtifactBrowser.SimpleSearch.filter.type">Type</message>