Last modified: 2011-03-13 18:06:11 UTC
Created attachment 3920 [details] Remove redirects from AJAX Search results AJAX Search functionality seems to return redirects as part of it's results. See attached patch that checks page_is_redirect column to be 0. From the first glance it seems that putting this restriction after page_title LIKE ... is better because indexes are on page_namespace followed by page_title, but I'm not sure if they are used that much with LIKE. Someone with better knowledge of MW db indexes, please check.
We want to include redirects; that's one of the reasons they exist.
Yes, I understand your point - every name is worth keeping. It seems to be a problem with some other installations though - with setups where there are many misspelling redirects or other non-essential ones. Maybe it should be configurable.
Misspelling redirects are there for a reason too. If someone quickly types, on Wiktionary, "superce", then pauses, they should get "supercede" as an option even if it's a redirect to "supersede". Because otherwise they'll say, hey, what's with this stupid dictionary not having the word I want? Obviously that's just an example, but you see the point, I think.
Yes, exactly. For some projects it makes sense, but it doesn't for others. Check how many JRR Tolkiens are out there - maybe showing all of them doesn't make sense. Regular search on Wikipedia doesn't show them (but if user typed Tolkein, then it'll show Tolkien) it means that there are reasons for not showing redirects in search results on some projects. I propose to have it configurable and I can probably create a patch for that.
The ideal behavior in most cases would likely be to list the original in the result (perhaps with a little note that it was found via a redirect) -- and to only return _one_ result, rather than multiple matching redirects.
Yes, sounds reasonable. I'll see if I can do that.