discovery.xml (dspace 7.5)

402 vues
Accéder directement au premier message non lu

Aroldo Rique

non lue,
4 mai 2023, 21:47:1004/05/2023
à 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

Aroldo Rique

non lue,
6 mai 2023, 15:46:0206/05/2023
à 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:
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

--
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.

DSpace Technical Support

non lue,
8 mai 2023, 12:03:2008/05/2023
à DSpace Technical Support
Hi,

I believe you need to change the "sidebarFacets" under the "defaultConfiguration" (which is the one used by default on the search page) around here in the discovery.xml:

And here's how to create a brand new filter/facet: https://wiki.lyrasis.org/display/DSDOC7x/Discovery#Discovery-Searchfilters&sidebarfacetsCustomization  (There are plenty of examples in the discovery.xml near the bottom)

Keep in mind, as it says in the documentation, you will need to do a *full reindex of all content* before the changes will take effect.

Tim

Aroldo Rique

non lue,
8 mai 2023, 13:18:0008/05/2023
à DSpace Technical Support
Hello Tim.

Thanks for your help. In dspace6, I can easily add filters, but in dspace 7.5, even performing the settings you indicated, the new filter still doesn't appear. Below is the changes I made to my discovery.xml:

image.png

I also created the searchFilterUnidade, with the metadata I want and the bean sortUnidade:

image.png

image.png


Even so, the filter still does not appear on the screen.

Has anyone already working with dspace 7.x successfully added filters?

Aroldo






You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/cb238c5a-efa9-45cb-a478-0b0909442c1bn%40googlegroups.com.

DSpace Technical Support

non lue,
8 mai 2023, 13:29:0608/05/2023
à DSpace Technical Support
Hi Aroldo,

Make sure that you perform a reindex after adding the new configuration.  You must reindex (./dspace index-discovery -b) all content before new filters/facets will show up.

Developers have added new filters to the codebase during the DSpace 7 development process.  As you can see in your screenshots, there's a large number of new filters we've added to support Configurable Entities. So, this should all work.  That said, maybe someone else on this list can help verify that they've added custom filters/facets to DSpace 7.

You may also want to verify that no errors are being thrown in the dspace.log when you perform a reindex, etc.

Tim

Aroldo Rique

non lue,
8 mai 2023, 15:15:1308/05/2023
à DSpace Technical Support
Olá Tim.

Base reindexada, sem erros.

imagem.png

Mas o novo filtro ainda não aparece.

Aroldo Rique

non lue,
8 mai 2023, 15:16:4708/05/2023
à DSpace Technical Support
Hi, Tim

Reindexed base, no errors.

image.png

But the new filter still does not appear.

Aroldo

darryl....@usask.ca

non lue,
9 mai 2023, 12:51:4009/05/2023
à DSpace Technical Support
| That said, maybe someone else on this list can help verify that they've added custom filters/facets to DSpace 7.

We're running DSpace 7.5 on a dev and test server, and have successfully made changes to the filters.  We re-ordered a couple, removed one or two we didn't want, and added 3 or 4 based on ETDms metadata (department, program, degree, etc).  Changes were made to dspace/config/spring/api/discovery.xml

I'm never sure what changes DSpace will pick up on the fly and which require a restart, so now I just always restart Tomcat after every config change.  In this case I edited discovery.xml, restarted Tomcat, ran the re-index, restarted Tomcat, then checked the browser to see if the filters changes were there (they were).

I made my changes to both the sidebarFacets and searchFilters sections of the defaultConfiguration. I wasn't 100% clear on what the difference between those 2 sections was, but the default Author, Subject (etc) filters were defined in both places, so I replicated that behaviour.

- Darryl

Aroldo Rique

non lue,
9 mai 2023, 13:05:3309/05/2023
à darryl....@usask.ca,DSpace Technical Support
Thank you, Darryl!

Please could you send me a copy of your discovery.xml?

You can send it to aro...@gmail.com

darryl....@usask.ca

non lue,
9 mai 2023, 13:39:4309/05/2023
à DSpace Technical Support
I've emailed Aroldo my revised discovery.xml directly, but for anyone who may come across this thread and be interested, I also created a gist:


- Darryl

Aroldo Rique

non lue,
9 mai 2023, 16:16:5609/05/2023
à darryl....@usask.ca,DSpace Technical Support
Dear all, thank you so much for your help, especially Tim and Darryl.

I finally managed to insert a filter.

I believe there was some problem indexing the dc.contributor.editor metadata.

My filter code originally looked like this:

The filter was not showing up. I replaced the indexFieldName with another metadata (publisher) and the filter finally appeared:

image.png

After that, I returned the indexFieldName to editor, as it was originally, I added the following lines in pt-BR.json:

"search.filters.filter.editor.head": "Unidade",
"search.filters.filter.editor.label": "Procurar por Unidade",
"search.filters.filter.editor.placeholder": "Unidade",

In each change, always ran the command ./dspace index-discovery -b

And the filter turned up perfectly!

image.png


Thank you very much!



Aroldo Rique

non lue,
10 mai 2023, 14:01:0710/05/2023
à darryl....@usask.ca,DSpace Technical Support
Hello everybody.

Still talking about filters, I read that it is possible to customize filters for a specific collection.

In the case below, I intend, for example, that the PFDC - Portaria collection has some different filters.

image.png

To do so, just create a new bean, similar to defaultConfiguration, and change the bean id to the collection handle, like the code below? Inside the bean, I would place the filters I want for this collection.

image.png

Aroldo

darryl....@usask.ca

non lue,
10 mai 2023, 17:49:1010/05/2023
à DSpace Technical Support
Aroldo, my understanding of DSpace 7 is that it no longer supports per community/collection filters.

I think per community/collection filters/facets were only supported in the old XMLUI interface and were primarily used during browse.  DSpace 7 doesn't support facets during browse (only as part of search) so defining a new configuration and attempting to assign that to a collection doesn't work.  At least that has been my experience as I tried the very same thing you are trying now. :)

- Darryl

Aroldo Rique

non lue,
10 mai 2023, 18:07:2510/05/2023
à darryl....@usask.ca,DSpace Technical Support
Thank you, Darryl.
Perhaps custom filters by collections are not so necessary, because, like you,
I noticed that DSpace will leave out the filters if there are no results. Then I can put all the filters I use in my repository in the defaultConfiguration.

Aroldo

Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message