[Dspace-tech] Filter by language - search

84 views
Skip to first unread message

Searle, Shannon

unread,
Aug 26, 2015, 2:46:26 PM8/26/15
to dspace-tech (dspace-tech@lists.sourceforge.net)
Hello again,

I have a number of foreign language papers in the repository and I have been asked if it is possible to filter by language -some have multiple dc.language settings? I see it is indexed in dspace.cfg but not showing up in the search filter...does anyone know where that is set so it shows in the search/sort filters? It's DSpace 4.2....

Thanks!
Shannon

Shannon Searle
Library Systems Integration and Development Officer
Building 70, Barrington Library, Cranfield Defence and Security
Cranfield University, Defence Academy of the UK,
Shrivenham, Swindon
Wiltshire
SN6 8LA
s.se...@cranfield.ac.uk<mailto:s.se...@cranfield.ac.uk>

winmail.dat

Claudia Jürgen

unread,
Aug 26, 2015, 2:46:28 PM8/26/15
to dspac...@lists.sourceforge.net

Hello Shannon,

how to customize the search filters for 4.x is described here:
https://wiki.duraspace.org/display/DSDOC4x/Discovery#Discovery-Searchfilters&sidebarfacetsCustomization

Hope this helps

Claudia
> ------------------------------------------------------------------------------
>
>
Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support
> that you need to offload your IT needs and focus on growing your
> business. Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
>
>
>
> _______________________________________________ DSpace-tech mailing
> list DSpac...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech List
> Etiquette:
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>

--
Claudia Juergen
Eldorado

Technische Universität Dortmund
Universitätsbibliothek
Vogelpothsweg 76
44227 Dortmund

Tel.: +49 231-755 40 43
Fax: +49 231-755 40 32
claudia...@ub.tu-dortmund.de
www.ub.tu-dortmund.de


Wichtiger Hinweis: Die Information in dieser E-Mail ist vertraulich. Sie
ist ausschließlich für den Adressaten bestimmt. Sollten Sie nicht der
für diese E-Mail bestimmte Adressat sein, unterrichten Sie bitte den
Absender und vernichten Sie diese Mail. Vielen Dank.
Unbeschadet der Korrespondenz per E-Mail sind unsere Erklärungen
ausschließlich final rechtsverbindlich, wenn sie in herkömmlicher
Schriftform (mit eigenhändiger Unterschrift) oder durch Übermittlung
eines solchen Schriftstücks per Telefax erfolgen.

Important note: The information included in this e-mail is confidential.
It is solely intended for the recipient. If you are not the intended
recipient of this e-mail please contact the sender and delete this
message. Thank you.
Without prejudice of e-mail correspondence our statements are only
legally binding when they are made in the conventional written form
(with personal signature) or when such documents are sent by fax.

Luiz dos Santos

unread,
Aug 26, 2015, 2:46:29 PM8/26/15
to Dspace Tech
Hi Claudia,

    So the configuration should be something like:

<bean id="searchFilterLanguage" class="org.dspace.discovery.configuration.DiscoverySearchFilter">
    <property name="indexFieldName" value="language"/>
    <property name="metadataFields">
        <list>
            <value>dc.language</value>
        </list>
    </property>
</bean>


These lines must be add in the file ../config/spring/api/dicovery.xml.


That is it?

Thanks
Luiz

helix84

unread,
Aug 26, 2015, 2:46:35 PM8/26/15
to Luiz dos Santos, Dspace Tech
On Wed, Jul 22, 2015 at 4:04 PM, Luiz dos Santos <lui...@gmail.com> wrote:
That is it?


"After modifying sidebarFacets and searchFilters, don't forget to reindex existing items by running [dspace]/bin/dspace index-discovery -b, otherwise the changes will not appear."

If you also want facets:

"Each sidebar facet must also occur in the list of the search filters."


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Searle, Shannon

unread,
Aug 26, 2015, 2:47:00 PM8/26/15
to dspac...@lists.sourceforge.net, Claudia...@ub.tu-dortmund.de
Thanks Claudia, that was very helpful!
Shannon

Searle, Shannon

unread,
Aug 26, 2015, 2:47:00 PM8/26/15
to hel...@centrum.sk, Luiz dos Santos, dspace-tech (dspace-tech@lists.sourceforge.net)
Thanks everyone, that is working now for DSpace 4. The configuration needs to be added in three places in discovery.xml - in /dspace/config/spring/api /discovery.xml

Around line 109

103 <!--The search filters which can be used on the discovery search page-->
104 <property name="searchFilters">
105 <list>
106 <ref bean="searchFilterTitle" />
107 <ref bean="searchFilterAuthor" />
108 <ref bean="searchFilterSubject" />
109 <ref bean="searchFilterIssued" />
110 <ref bean="searchFilterLanguage" />
111 </list>
112 </property>

And near line 209
207 <!--The search filters which can be used on the discovery search page (same as defaultConfiguration above)-->
208 <property name="searchFilters">
209 <list>
210 <ref bean="searchFilterTitle" />
211 <ref bean="searchFilterAuthor" />
212 <ref bean="searchFilterSubject" />
213 <ref bean="searchFilterIssued" />
214 <ref bean="searchFilterLanguage" />
215 </list>
216 </property>

And the definition of the filter as suggested by Luiz

<bean id="searchFilterLanguage" class="org.dspace.discovery.configuration.DiscoverySearchFilter">
316 <property name="indexFieldName" value="language"/>
317 <property name="metadataFields">
318 <list>
319 <value>dc.language</value>
320 </list>
321 </property>
322 </bean>

A couple more things:
In the drop down for the filter name it shows up as xmlui.discovery.SimpleSearch.filter.language – I would have expected to change it in messages.xml in
/dspace/webapps/xmlui/i18n/messages.xml, but for the default language English actually you have to change it under
/dspace/webapps/xmlui/WEB-INF/classes/aspects/Discovery/i18n/messages.xml:

89 <message key="xmlui.ArtifactBrowser.SimpleSearch.filter.author">Author</message>
90 <message key="xmlui.ArtifactBrowser.SimpleSearch.filter.title">Title</message>
91 <message key="xmlui.ArtifactBrowser.SimpleSearch.filter.subject">Subject</message>
92 <message key="xmlui.ArtifactBrowser.SimpleSearch.filter.dateIssued">Date issued</message>
93 <message key="xmlui.ArtifactBrowser.SimpleSearch.filter.language">Language</message>

And finally you need to re-index using discovery-index –b as suggested by Hilton Gibson if that term is not already being indexed.

Thanks everyone!

Shannon

From: helix84 [mailto:hel...@centrum.sk]
Sent: 23 July 2015 09:06
To: Luiz dos Santos <lui...@gmail.com>
Cc: Dspace Tech <dspac...@lists.sourceforge.net>
Subject: Re: [Dspace-tech] Filter by language - search

winmail.dat

Layale Bassil

unread,
Aug 26, 2015, 3:45:09 PM8/26/15
to Searle, Shannon, hel...@centrum.sk, Luiz dos Santos, dspace-tech (dspace-tech@lists.sourceforge.net)

Dear All,

 

I am trying to do the same as explained below but using Dspace 5.2. I added all the below steps and re-indexed but nothing is taking effect! Where the changes should appear?

 

I am opening the Filters dropdown in the discover page but the language is not listed in the Filters dropdown.

 

What can I do?

Thanks!

Reply all
Reply to author
Forward
0 new messages