Newly created filter is not working in sidebar facet

91 views
Skip to first unread message

Raja muthukrishnan Ramanujam

unread,
Jan 5, 2024, 6:49:00 AM1/5/24
to DSpace Technical Support
Hello Team,

I want to add "level"->[dc.feyenoord.level] as sidebar facet and search filter. I did all things like -> Add the following code snippet to "discovery.xml"->
<bean id="searchFilterlevel" class="org.dspace.discovery.configuration.DiscoverySearchFilterFacet">
        <property name="indexFieldName" value="level"/>
        <property name="metadataFields">
            <list>
                <value>dc.feyenoord.level</value>
            </list>
        </property>
        <property name="facetLimit" value="5"/>
        <property name="sortOrderSidebar" value="COUNT"/>
        <property name="sortOrderFilterPage" value="COUNT"/>
    </bean>
<property name="sidebarFacets">
            <list>
                <ref bean="searchFilterAuthor" />
                <ref bean="searchFilterSubject" />
                <ref bean="searchFilterIssued" />
                <ref bean="searchFilterContentInOriginalBundle"/>
                <ref bean="searchFilterEntityType"/>
                <ref bean="searchFilterlevel" />
            </list>
        </property>
        <!-- Set TagCloud configuration per discovery configuration -->
        <property name="tagCloudFacetConfiguration" ref="defaultTagCloudFacetConfiguration"/>
        <!--The search filters which can be used on the discovery search page-->
        <property name="searchFilters">
            <list>
                <ref bean="searchFilterTitle" />
                <ref bean="searchFilterAuthor" />
                <ref bean="searchFilterSubject" />
                <ref bean="searchFilterIssued" />
                <ref bean="searchFilterContentInOriginalBundle"/>
                <ref bean="searchFilterFileNameInOriginalBundle" />
                <ref bean="searchFilterFileDescriptionInOriginalBundle" />
                <ref bean="searchFilterEntityType"/>
                <ref bean="searchFilterIsAuthorOfPublicationRelation"/>
                <ref bean="searchFilterIsProjectOfPublicationRelation"/>
                <ref bean="searchFilterIsOrgUnitOfPublicationRelation"/>
                <ref bean="searchFilterIsPublicationOfJournalIssueRelation"/>
                <ref bean="searchFilterIsJournalOfPublicationRelation"/>
               <!--  <ref bean="searchFilterCustomMetadata" /> -->
               <ref bean="searchFilterlevel" />
            </list>
        </property>
<!--Use site to override the default configuration for the home page & default discovery page-->
                <entry key="site" value-ref="homepageConfiguration" />

and also add the line in '[dspace-install]/config/dspace.cfg' file
webui.browse.index.5 = level:metadata:dc.feyenoord.level.*:text

while reindex getting this below exception and still its working in sidebar facet,

C:\dspace\bin>dspace index-discovery -b
Using DSpace installation in: C:\dspace
The script has started
(Re)building index from scratch.
java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3
        at org.dspace.browse.BrowseIndex.interpretField(BrowseIndex.java: 769)
        at org.dspace.browse.BrowseIndex.generateMdBits(BrowseIndex.java: 341)
        at org.dspace.discovery.SolrServiceMetadataBrowseIndexingPlugin.additionalIndex(SolrServiceMetadataBrowseIndexingPlugin.java: 90)
        at org.dspace.discovery.indexobject.IndexFactoryImpl.buildDocument(IndexFactoryImpl.java: 67)
        at org.dspace.discovery.indexobject.DSpaceObjectIndexFactoryImpl.buildDocument(DSpaceObjectIndexFactoryImpl.java: 30)
        at org.dspace.discovery.indexobject.ItemIndexFactoryImpl.buildDocument(ItemIndexFactoryImpl.java: 143)
        at org.dspace.discovery.indexobject.ItemIndexFactoryImpl.buildDocument(ItemIndexFactoryImpl.java: 80)
        at org.dspace.discovery.SolrServiceImpl.update(SolrServiceImpl.java: 169)
        at org.dspace.discovery.SolrServiceImpl.indexContent(SolrServiceImpl.java: 159)
        at org.dspace.discovery.SolrServiceImpl.updateIndex(SolrServiceImpl.java: 344)
        at org.dspace.discovery.SolrServiceImpl.updateIndex(SolrServiceImpl.java: 331)
        at org.dspace.discovery.SolrServiceImpl.createIndex(SolrServiceImpl.java: 299)
        at org.dspace.discovery.IndexClient.internalRun(IndexClient.java: 72)
        at org.dspace.scripts.DSpaceRunnable.run(DSpaceRunnable.java: 104)
        at org.dspace.app.launcher.ScriptLauncher.executeScript(ScriptLauncher.java: 149)
        at org.dspace.app.launcher.ScriptLauncher.handleScript(ScriptLauncher.java: 131)
        at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java: 98)

Kindly help to resolve the issue...

Regards,
Raja



Reply all
Reply to author
Forward
0 new messages