Enable filter by an Item Type

102 views
Skip to first unread message

PROTOS tecnologia (PROTOS TECNOLOGIA)

unread,
May 17, 2023, 11:58:06 AM5/17/23
to DSpace Technical Support
Hi everybody, I'm stuck with enabling the filter by type in the search section of dspace.

I was researching according to this guide, but I can't figure out how to enable it.

this is an image capture about dspace demo, and how would it be according to what I need

filtering.jpg
filtering.jpg

please, any kind of help will be appreciate.
thank you.
Sebastian.

PROTOS tecnologia (PROTOS TECNOLOGIA)

unread,
May 17, 2023, 12:12:56 PM5/17/23
to DSpace Technical Support
My dpsace site in the search section looks like this:  (where the option to filter by type does not appear)

filtering now.jpg

DSpace Technical Support

unread,
May 17, 2023, 3:03:50 PM5/17/23
to DSpace Technical Support
Hi,

The Filter By "Item Type" section will only appear if you enable Configurable Entities.  That filter will limit the results to a particular Entity or Item Type.
https://wiki.lyrasis.org/display/DSDOC7x/Configurable+Entities

On the demo site, we have Configurable Entities enabled by default, which is how that filter appears.  It will automatically appear as soon as Entities are enabled and you create two or more types of Entities.

Tim

PROTOS tecnologia (PROTOS TECNOLOGIA)

unread,
Jun 7, 2023, 12:29:22 AM6/7/23
to DSpace Technical Support
Hello everybody.  In order to enable the filter "dc.type" at section of search in the user interface.

After reading and understanding the steps to enable the  "Configurable Entities" , according to the guide, I was finally able to enable them!. According to the guide you must enable a defined entity model, it MUST be imported into the DSpace database; this is achieved by using the "initialize-entities" script. then through the command console I enter the following statement: sudo /dspace/bin/dspace initialize-entities -f /dspace/config/entities/relationship-types.xml

Everything is fine until here, But when I want filtering by "dc.type" in the search section; the "Item Type" filter appears; but this filter refers to filter by "dspace.entity.type". So when I doing click on the filter "Item type", shows only the types of entities that exist ( in this example are Person and Publication), and not the types of files ( for example a book, an article, an Learning object, etc) that i select when creating an item. 

entities.jpg
When i create an item, i always select a type of item ( for example a book, an article, an Learning object, etc).

entities 2.jpg

but this type doesn't appear when i click in the filter "Item type"; this filter shows only the type of entities that exists.

How can i do in order to solve this?

Thank you very much.

Eike Martin Löhden

unread,
Jun 7, 2023, 3:40:24 AM6/7/23
to PROTOS tecnologia (PROTOS TECNOLOGIA), DSpace Technical Support

Hey,

the type in this filter only refers to the field "dspace.entity.type". What you need is a filter for the field "dc.type". It already exists, but must be added to the default search-configuration in your discovery.xml ([dspace]/config/spring/api/discovery.xml). In this section: https://github.com/DSpace/DSpace/blob/bf8df5b1e8b49f0f3c13f2475d0b8732acc7fd93/dspace/config/spring/api/discovery.xml#L161

Add "<ref bean="searchFilterType" /> to the searchFilters and sidebarFacets. Then execute "[dspace]/bin/dspace index-discovery -b" and restart the tomcat. Now it should a appear at the sidebar, if there is any item with this metadata-field in your repository.

Kind regards,
Eike.

--
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 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/c91d862a-9337-4721-91e4-7212c426c0c4n%40googlegroups.com.
Message has been deleted

Protos

unread,
Jun 7, 2023, 10:54:37 AM6/7/23
to Eike Martin Löhden, DSpace Technical Support

Yes!! That's it.  After i put the reference of filtertype on searchFilters and sidebarFacets, and then execute "[dspace]/bin/dspace index-discovery -b" and restart the tomcat;
the filter "Type" appears.

Problem solved. Thank you very very much Eike!. I had been stuck for a long time on this problem.

Sebastian.

Reply all
Reply to author
Forward
0 new messages