Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API call core/items/search/findAllById is throwing an error, when it contains too many id parameters #443

Open
olli-gold opened this issue Mar 8, 2024 · 0 comments
Labels

Comments

@olli-gold
Copy link

olli-gold commented Mar 8, 2024

Describe the bug
DSpace-CRIS uses the method findAllById (while generic DSpace does not do that). Unfortunately, if the page size in the search results is set too high and there are results with too many authors, it may happen, that it contains too many IDs at once. One example, where that happens, is https://tore.tuhh.de/search?query=wiedorn. The result list for this simple query does never return and there is only a never ending loading loop on the result page. The reason for this failing search is the API call for https://tore.tuhh.de/dspace-cris-server/api/core/items/search/findAllById

The query contains 195 id parameters and is throwing a 400 error.

To Reproduce
Steps to reproduce the behavior:
See bug description: https://tore.tuhh.de/search?query=wiedorn

Expected behavior
I would expect, that the query should not fail. I realise, that this problem is not easily resolvable and certainly a little bit special, but maybe it's worth to consider changing the implementation of https://github.com/4Science/DSpace/blob/main-cris/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ItemRestRepository.java#L410. To be honest, I do not have an exact idea about that, but I am almost certain, that it should be possible to improve that (for instance by asking core/items/search/findAllById for only single IDs in the result one after the other or by limiting the query to a fixed maximum number of UUIDs to be queried).

Related work
None I am aware of.

@olli-gold olli-gold added the bug label Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant