新添加的过滤器不在侧栏方面

时间:2015-02-24 06:39:46

标签: xml xslt dspace

我想添加"教育级别" - > [dcterms.educationlevel]作为侧边栏构面和搜索过滤器。 我做了所有的事情 - > 将以下代码段添加到" discovery.xml" - >



<bean id="educationLevel" class="org.dspace.discovery.configuration.DiscoverySearchFilterFacet">
    <property name="indexFieldName" value="educationlevel"/>
    <property name="metadataFields">
        <list>
            <value>dcterms.educationlevel</value>
        </list>
    </property>
    <property name="type" value="text"/>
    <property name="sortOrder" value="VALUE"/>
</bean>
&#13;
&#13;
&#13;

并添加以下行

&#13;
&#13;
		<ref bean="educationLevel" />
&#13;
&#13;
&#13;

到以下区域(在&#39; discovery.xml&#39;中)

&#13;
&#13;
<!--The default configuration settings for discovery-->
    <bean id="defaultConfiguration" class="org.dspace.discovery.configuration.DiscoveryConfiguration" scope="prototype">
        <!--Which sidebar facets are to be displayed-->
        <property name="sidebarFacets">
            <list>
               	<ref bean="searchFilterAuthor" />
		<ref bean="searchFilterType" />
		<ref bean="searchFilterSubject" />
                <ref bean="searchFilterIssued" />
		<ref bean="searchFilterMIMEType" />
		<ref bean="searchFilterLanguage" />
		<ref bean="searchFilterSourceOrganization" />
		<ref bean="typeOfLearningMaterial" />
		<ref bean="difficultyLevel" />
		**<ref bean="educationLevel" />**
            </list>
        </property>
        <!--The search filters which can be used on the discovery search page-->
        <property name="searchFilters">
            <list>
                <ref bean="searchFilterTitle" />
		<ref bean="searchFilterAuthor" />
		<ref bean="searchFilterType" />
                <ref bean="searchFilterSubject" />
                <ref bean="searchFilterIssued" />
		<ref bean="searchFilterMIMEType" />
		<ref bean="searchFilterLanguage" />
		<ref bean="searchFilterSourceOrganization" />
		<ref bean="typeOfLearningMaterial" />
		<ref bean="difficultyLevel" />
		**<ref bean="educationLevel" />**
            </list>
        </property>
&#13;
&#13;
&#13;

并添加下面提到的区域,

&#13;
&#13;
    <bean id="homepageConfiguration" class="org.dspace.discovery.configuration.DiscoveryConfiguration" scope="prototype">
&#13;
&#13;
&#13;

并添加行

&#13;
&#13;
search.index.15 = educationlevel:dcterms.educationlevel
&#13;
&#13;
&#13;

in [dspace-install] /config/dspace.cfg'文件

并添加行

&#13;
&#13;
	<message key="xmlui.ArtifactBrowser.SimpleSearch.filter.educationlevel">Education Level</message> 
&#13;
&#13;
&#13;

在文件中 - &gt; [dSPACE的安装] /webapps/xmlui/i18n/messages.xml

但它没有进入侧边栏,请帮助。

1 个答案:

答案 0 :(得分:1)

确保实际上有包含该元数据的项目。在您的评论中,您说除了dcterms.educationlevel之外,您添加的其他自定义侧边栏构面都有效。作为测试,请尝试编辑您的某个项目并添加该元数据。

  

Sidebar Facets的另一个重要特性是其内容会自动更新到页面的上下文中。在收集主页或社区主页上,它将包含有关该特定集合或社区中包含的项目的信息。

搜索后也会显示。如果元数据注册表中不存在元数据,则必须先手动添加(我假设您已经这样做了,因为您包含的其他元数据不在默认元数据注册表中)。