discovery.xml (dspace 7.5)

58 views
Skip to first unread message

Aroldo Rique

unread,
May 4, 2023, 9:47:09 PM5/4/23
to dspac...@googlegroups.com, DSpace Community, dspace...@googlegroups.com
Hey guys!

I'm having trouble inserting new filters into dspace 7.5 search. We are migrating a digital repository from version 6 to version 7.5 and, one of our demands is the addition of filters to the filters that already exist, by default, in dspace 7.5.

I checked the dspace 6 discovery.xml docs, which is linked https://wiki.lyrasis.org/display/DSDOC6x/Discovery#Discovery-GeneralDiscoverysettings(config/modules/discovery.cfg) with the discovery docs. xml of dspace 7, which is in the link https://wiki.lyrasis.org/display/DSDOC7x/Discovery#Discovery-GeneralDiscoverysettings(config/modules/discovery.cfg) and I realized that both are very close. It looks like the dsapce 7.x discovery.xml docs haven't been updated yet. The dspace 7.x discovery.xml is quite different from the dspace 6.x discovery.xml. The presentation of the filters is also quite different.

dspace 6:

image.png

dspace 7:

image.png

Are there any dspace 7 specific documents about filters? Is it possible to add new filters in dspace 7?

Aroldo Rique

Tim Donohue

unread,
May 5, 2023, 11:59:25 AM5/5/23
to DSpace Developers
Hi Aroldo,

As far as I'm aware, adding filters in DSpace 7 should be the same as in DSpace 6.  While there have been new sections added to the discovery.xml, the structure of that file is unchanged.  So, the existing documentation *should still be accurate* for DSpace 7.  If you are finding it is *not* accurate, then please do let us know and we can look into it further.

Tim

Aroldo Rique

unread,
May 6, 2023, 1:19:06 PM5/6/23
to Tim Donohue, DSpace Developers
Hi tim.



image.png

--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-devel/68c65dd7-4830-4273-9dab-d1e731b428f1n%40googlegroups.com.

Aroldo Rique

unread,
May 6, 2023, 1:26:58 PM5/6/23
to Tim Donohue, DSpace Developers
Hi Tim!

I will explain to you my main doubt. I'm wanting to include the Type filter in the search screen below:

image.png

So I changed the discovery.xml in two code snippets.
Here:

image.png
And here:
image.png

This was how I added filters in advanced search in dspace 6.

In dspace 7.5, even though I made these changes to dscovery.xml above, the type filter still doesn't appear on the search screen.

Another thing I noticed is that, depending on the term to be searched, the filters change, as in the search below. I didn't quite understand the reason for that. So perhaps better documentation on this search screen would be nice.

image.png

Aroldo


Em sex., 5 de mai. de 2023 às 12:59, 'Tim Donohue' via DSpace Developers <dspace...@googlegroups.com> escreveu:
--

Aroldo Rique

unread,
May 6, 2023, 3:46:01 PM5/6/23
to Tim Donohue, DSpace Developers, dspac...@googlegroups.com
In short, Tim: after searching for a term (blue), where in the discovery.xml (which section) should I change to include a filter (red)?
image.png




Em sex., 5 de mai. de 2023 às 12:59, 'Tim Donohue' via DSpace Developers <dspace...@googlegroups.com> escreveu:
--

Lorenzo Bocchi

unread,
Dec 5, 2023, 7:58:42 AM12/5/23
to DSpace Developers
Hi guys,
sorry to bring back this old thread, but I'm having the exact same issue. We are also trying to move from dspace 6 to dspace 7, but for some reason the custom filters don't load. I have added the filter both in the defaultConfiguration and the homepageConfiguration, just like Aroldo, and of course also defined the filter's bean. I tried both rebuilding the index with "dspace/bin/dspace index-discovery -b" and also forcing the update with "dspace/bin/dspace index-discovery -f", but neither of them worked. I also tried removing the "author" filter, which is there by default, but the configuration doesn't seem to change. Is there something I've missed? As far as I'm aware, the docs only suggest to rebuild the index after changing the filters.

Thanks in advance,
Lorenzo

Lorenzo Bocchi

unread,
Dec 7, 2023, 7:32:44 AM12/7/23
to DSpace Developers
Just to add some more context, in the homepageConfiguration and the defaultConfiguration I've added the following both in the searchFilters and sidebarFacets property lists:
<ref bean="searchFilterGenere">

Then further down with the other filters I've added the following:
<bean id="searchFilterGenere" class="org.dspace.discovery.configuration.DiscoverySearchFilterFacet">
    <property name="indexFieldName" value="genere">
    <property name="metadataFields">
        <list>
            <value>local.genere</value>
        </list>
    </property>

</bean>
I have also tried adding more properties to this but nothing changed.

Finally, as said previously, I tried both rebuilding the index with "dspace/bin/dspace index-discovery -b" and also forcing the update with "dspace/bin/dspace index-discovery -f".

When I try to launch a search with f.genere=value,sorting it gives me an error (type=Bad Request, status=400).

Lorenzo Bocchi

unread,
Dec 11, 2023, 5:08:02 AM12/11/23
to DSpace Developers
In the end, I was able to solve this by simply restarting tomcat as suggested here: https://groups.google.com/g/dspace-tech/c/0BlPvLpavS4/m/a5Xxur-pBwAJ.
Reply all
Reply to author
Forward
0 new messages