https://bugzilla.wikimedia.org/show_bug.cgi?id=71491
--- Comment #9 from Gryllida <[email protected]> --- > The link seems to be working now but I have no doubt that it was failing > before. Its pretty difficult to debug it without breaking it worse. Oops. Works now. > 2. This kind of issue isn't going to make us switch LuceneSearch back to the > primary for ruwiki or ruwikinews. I am not asking for primary. I would like to have it as an /option/. At the time it was timing out, there was no such option. > A (maybe bad) idea! What if we piped the list of redirects > that match the query back through the api. You'd still > get the non-redirect page back but it'd come with a redirect list. The way the wikilinker gadget works now, with LuceneSearch, is that it takes the first 3 results and chooses the shortest one. Such rewrite could be a threat to results relevancy or similarity. Snippet from the gadget: -- // если в запросе было только одно слово, то выбираем самое короткое название из первых трёх результатов // чтобы для "Аглией" выдавалось "Англия", а не "Англиканство" if ( requestTokens === 1 ) { var resar = []; for ( var j = 0; j <= 4; j++ ) { if ( typeof resp.query.search[j] !== 'undefined' && txt.substr( 0, 3 ).toLowerCase() === resp.query.search[j].title.substr( 0, 3 ).toLowerCase()) { resar.push( resp.query.search[j].title ); } } resar.sort( compareStringLengths ); if ( typeof resar[0] !== 'undefined' ) { pageName = resar[0]; } } -- This could be, in theory, rewritten to pull a list of results + the redirects, and picking the shortest ones. But this would not guarantee the best result, as some of the redirect origins could be rather short but irrelevant. See: lucene search: 1. [[biology]] (redirect to [[category:biology]]) 2. [[category:biology]] 3. ... cirrus search: 1. [[category:biology]] <- [[biology]] <- [[bio]] <- ... 2. [[biologists discover world's smallest orchid]] <- ... With cirrus search, the script for "biology" would return "[[bio|biology]]", but it doesn't mean that such wikilink would be accurate. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
