Skip to content

api: Remove visit_types field in origins endpoint responses

The recent addition of the visit_types field in origins endpoint responses significantly degraded the performance of the HTTP requests as visit types info are fetched on the backend side by sending requests to elasticsearch for each origin in a page.

It has been observed by an endpoint client (OpenAIRE) that requests could fail by returning read timeout errors related to elasticsearch not responding in time when fetching visit types info.

So revert the addition of that field in order to significantly speedup response time as requests to elasticsearch will no longer be made by the backend.

Related Sentry issue: SWH-SEARCH-3H.

Edited by Antoine Lambert

Merge request reports