Closed GresilleSiffle closed 7 months ago
I moved this issue in the selected column because it's the continuation of a pull request that is about to be merged.
Feel free to move back this issue in the Idea column in case of need.
The way it has been implemented in #1961 has a small issue.
The recommended entities, which represent 4 / 20 of entities recommended by the ClassicEntitySuggestionStrategy
, are randomly selected. If a user has en
and it
defined as his/her preferred languages, the suggestions will contain mostly in English recommendations, because the API database has far more English entities than Italian. In fact, it's possible that the user will get zero entities matching the Italian language.
This is even more problematic for a user having only it
defined as his/her preferred language. The view always adds en
to the preferred languages if they don't contain en
or fr
, and it's possible that this user will get only English recommendations even if the database contain enough recommendations in Italian.
I think the issue is small because:
This could be fixed by adding a "fallback" feature in the ClassicEntitySuggestionStrategy
class. Instead of returning recommended entities based on a single list of languages, the class could:
en
lang added)en
insteadedit as discussed with @amatissart , another "fix" could be simply to add the languages that are represented by enough entities to the list SuggestionsToCompare.min_lang_set
, see:
The suggestion strategy
ClassicEntitySuggestionStrategy
can include in its results entities from the recent and all-time recommendations.The recommendations should be returned according to the user's preferred languages configured in its setting
recommendations__default_languages
(if the poll has such a notion, not all polls have a language associated with their entities).pending questions
(a) What should we return when the user hasn't defined its preferred languages?
accept-language
request header as ultimate fallback(b) What should the strategy do when no recommendations are available in the user's preferred languages?