CirrusSearch has a limit for search query length (currently 300 on Wikimedia wikis) to avoid expensive searches (which are typically made by bots and are pointless or abusive); task suggestion searches (coming in the form of hastemplate:<list of templates defining a task type> morelikethis:<list of 5 pages defining a topic, combined for up to 20 topics selected by the user>) can easily exceed that, causing the user to get an error.
Possible fixes:
- increase the search limit for newcomer task queries (would have to assure first that these searches are not particularly expensive; since morelikethis works by picking the top 50 representative words from each page and substituting them in the search query, that might well not be the case). This would leave the remote (API-based) task suggester broken since we can't reliably identify newcomer task queries there.
- split into multiple queries. Currently we make up to 5 queries (one for each task type); this way it would be up to 100. That could take seconds (but worth profiling at least).
- prevent the user from picking too many topics in some way.