-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Describe the bug
Under certain conditions, search performance using the '/api/v1/dataresources/search' endpoint is unexpectedly slow. Mainly by including the ResourceType attribute, queries may cost a factor of 10. Due to relatively fast queries this effect gets relevant for very huge repositories (spotted at 84k DataResources)
To Reproduce
Steps to reproduce the behavior:
- Use search endpoint, e.g., http://{{HOSTNAME}}:{{PORT}}/api/v1/dataresources/search
- Provide a (valid) example DataResource including resourceType attribute in the request body, e.g.
{
"resourceType":{
"typeGeneral":"TEXT"
},
"publicationYear":"2019"
}
- Measure the response time, e.g., 2 seconds
- Change the example DataResource to include a full resourceType, e.g.
{
"resourceType":{
"typeGeneral":"TEXT",
"value":"manuscriptMetadata"
},
"publicationYear":"2019"
}
- Measure the response time, e.g., 20 seconds
- Change the example DataResource again to include another top-level, primitive attribute, e.g., publisher
- Measure the response time, e.g., 2 seconds
Expected behavior
The expected behaviour is, that the response time does not change within an entire order of magnitude. Including resourceType will require a more complex query than querying only for, e.g., publisher and publicationYear. However, the impact should be much less and it should not depend on the number of primitive attributes within the query (see difference in measurement 5 and 7).
Screenshots
none
Desktop (please complete the following information):
- OS: MacOS, Windows, Unix
- REST Tool: Postman
- Version 7.36.0
Additional context
none