Description
We store all translations of every translated field in an array in ES. Those translations are not indexed, ES doesn't use them at all for finding documents, they are purely data we store so that we can return a full add-on object in search without needing to query MySQL.
For each search API request, we're transferring a lot of data between addons-server and Elasticsearch because of those translations: even when we know the language of the API request through the lang parameter, ES will still send to addons-server every translation of every field of every object in the response. The API code will then filter out what it needs to return to the client according to the lang parameter.
If we could tell ES to exclude the translations that are not needed for a particular request, we would transfer way less data, gaining in performance and saving some data transfer costs.
Acceptance Criteria
┆Issue is synchronized with this Jira Task
Description
We store all translations of every translated field in an array in ES. Those translations are not indexed, ES doesn't use them at all for finding documents, they are purely data we store so that we can return a full add-on object in search without needing to query MySQL.
For each search API request, we're transferring a lot of data between addons-server and Elasticsearch because of those translations: even when we know the language of the API request through the
langparameter, ES will still send to addons-server every translation of every field of every object in the response. The API code will then filter out what it needs to return to the client according to thelangparameter.If we could tell ES to exclude the translations that are not needed for a particular request, we would transfer way less data, gaining in performance and saving some data transfer costs.
Acceptance Criteria
┆Issue is synchronized with this Jira Task