On T261408, it says that the maximum number of link recommendations that should be shown to the user in a given session is 10. That maximum needs to be enforced somewhere. To deal with phrases that can't be found, we may want the server to send 15 recommendations and have the client display the first 10 that it can find.
|Resolved||Catrope||T261398 Add a link engineering: Prototype the recommended link plugin in VisualEditor using phrase matching approach|
|Declined||None||T267703 Add a link in VE: enforce a maximum number of recommendations|
Currently there is no concept of a buffer: the backend sends the "maximum links per task" config variable to the link recommendation service which returns only that many recommendations.
So 10 would be a hard-coded value unrelated to the "Maximum number of link recommendations to display per article" parameter mentioned in T266443: Add Link engineering: On-wiki configuration?
Ah. Yes, I think we should change refreshLinkRecommendations.php to ask for maximumLinksPerTask + 5 (hardcoded buffer value) and keep maximumLinksPerTask as the value for display purposes in VisualEditor.