How to customize DSpace "browse" navigation to use "contains" instead of "startsWith"?

28 views
Skip to first unread message

lucasangelo...@gmail.com

unread,
Jan 27, 2025, 9:18:16 AM1/27/25
to DSpace Community

Hello everyone,

I am using DSpace 8 and would like to know if it’s possible to customize the "browse" functionality to perform searches based on "contains" (substrings) instead of the default "startsWith".

For example, the current behavior executes searches like this:

https://demo.dspace.org/collections/b7bf809e-b8ea-41bf-b16a-38d78785f557/browse/title?bbm.page=1&startsWith=Editorial


I’d like to implement something similar to this:

https://demo.dspace.org/collections/b7bf809e-b8ea-41bf-b16a-38d78785f557/browse/title?bbm.page=1&contains=Editorial


I’ve reviewed the following points:

  1. The default behavior in DSpace uses startsWith, configured both in the front-end and in the REST services.
  2. Solr, on the back-end, also seems configured to index and process prefix-based (startsWith) queries rather than substring-based (contains) queries.

My questions are:

  1. What changes would be necessary in Solr (e.g., schema.xml) to support contains searches for fields like dc.title?
  2. Would the back-end (Discovery) need adjustments to accept and process a new query parameter like contains?
  3. Is there any existing configuration or approach in DSpace to enable this functionality without deep modifications to the codebase?

Thank you in advance for any guidance or practical examples to implement this feature.

Reply all
Reply to author
Forward
0 new messages