Manual talk:$wgEnableMWSuggest

Usage???

 * This worked for me under MediaWiki 1.13alpha:


 * Change www.example.com to your own domain and /wiki/ to your $wgScriptPath. -- Sayuri 20:51, 17 August 2008 (UTC)
 * You don't need to set $wgMWSuggestTemplate anymore in MW 1.13.0: the suggestion template is set to a reasonable default value. Maiden taiwan 02:48, 19 August 2008 (UTC)
 * Also be sure that $wgEnableAPI is not set to false and that you use 1.13. i Alex  20:54, 17 August 2008 (UTC)
 * I'm not able to get it working either. Are there any known conflicts that I should be aware of? Joezoo 14:40, 3 September 2008 (UTC)
 * (By the way, I'm using LuceneSearch on MW 1.13 with MWSearch installed. $wgUseAjax and $wgEnableMWSuggest are both set to true.) --Joezoo 14:52, 3 September 2008 (UTC)
 * Never mind! I got it working! Turns out, when I updated from the last version of MediaWiki, I didn't copy the new contents of skins/common, which included the mwsuggest and new ajax files. But now it's working! --Joezoo 15:38, 3 September 2008 (UTC)

Features?
Apart from the first character, this seems to be case-sensitive, which is a pity - who uses uppercase in search terms? Any way to get this case-insensitive? (don't know how to get this username-and timestamp - there are no edit-buttons here and it's not obvious where to look on Help:Editing - sorry.)
 * There's Extension:TitleKey to make suggestions case-insensitve (enbaled on Wikimedia wikis). i Alex  17:32, 20 November 2008 (UTC)
 * cool, thanks - it works. Would be even cooler to have arbitrary substring matching and additional Namespaces. (and the editing buttons are back so here's my sig :) --Heiko Haller 19:07, 20 November 2008 (UTC)

How to remove search suggest terms?
I'm relatively new to mediawiki so I accidentally created a page with an "&" symbol in it. Naturally, this created a truncated page title. However, in the search suggest dropdown it indexed it with the entire title including the "&" in it. I've modified the page to spell out "and" instead. But, the search suggest term remained (with the original "&" symbol in it). I tried deleting the record in the _searchindex table of the database, but it didn't affect the search suggested terms. Anyone know how to get rid of it? --Hahn73 20:51, 11 March 2009 (UTC)

Figured it out. In case anyone else needs to know - you need to delete the record from both the searchindex table AND the page table. --Hahn73 21:32, 11 March 2009 (UTC)


 * To delete a record from the page table is quite risky! In your specific case it was not necessary: after you move the page to the new title, just delete the old title (that has now become a redirect page) and it will disappear from the searches. Capmo 17:18, 30 March 2009 (UTC)

Extend the search
Can this be extended to search more than just the first word in a title?

For example, I'm looking for an article titled Pixar's Disney Toy Story

However, all I know is that Disney had some part in Toy Story.

I would start typing Dis.. and realize that nothing is coming up in the ajax search.

Is there a way to set the index to index more? Or another work around to do more?

Thanks


 * For these situations there is already the Search button, that will locate the typed word inside titles and pages. Capmo 17:24, 30 March 2009 (UTC)


 * And you may, of course, use redirects for alternative or incomplete terms... -- 85.181.27.9 06:43, 22 May 2009 (UTC)

I posted this problem as #20237. --Wissenslogistiker 08:58, 14 August 2009 (UTC)


 * Note that how the results are generated has nothing to do with $wgEnableMWSuggest and mwsuggest.js. What you probably want is a new extension that will override the default prefix backend (similar to Extension:TitleKey) and provide those additional results. However, I think you will find that unless your wiki is extremely small, this feature can be rather annoying, since in most of the cases, you don't want to see all the titles in alphabetical order that might have "dis" somewhere in them, or even titles where some word begins with dis. --Rainman 17:34, 14 August 2009 (UTC)

Adding Namespaces
How does one change/add namespaces for the MW Suggest engine to search? My wiki relies heavily on categories and would like the Suggestion tool to list them. Could anyone post a working example of the code needed to add them Please?
 * The namespaces that appear in suggestions are those that are either default (for anon users), or those from user preferences (for logged-in, Search tab in preferences). However, for performance reasons, this multiple-namespace suggestion feature has been turned off in TitleKey extension in revision 35607 (Special:Code/MediaWiki/35607). This has been hardcoded and is not configurable, and the only way to enable it presently is to revert this revision (or by checking out an earlier version of TitleKey). If you with to work on a patch to make it configurable, please do, and submit to bugzilla. :) --Rainman 18:45, 23 April 2009 (UTC)

Size of box
Although not directly related to EnableMWSuggest, I don't know where else to ask. I noticed on wikipedia the search box gets bigger and shows the full article name where as my wiki only displays the size of my search box and "..." if its too big. How do I increase the size of the search suggestions to be longer than the search box? --Bluesoju 14:18, 30 June 2009 (UTC)
 * This is a feature present in current development version of MediaWiki. Since you probably don't want to upgrade whole of your mediawiki until the new official release you can just copy the latest version of mwsuggest (e.g. from mediawiki.org) to your installation and use it until the new release. --Rainman 17:15, 30 June 2009 (UTC)
 * You have to add the following to you MediaWiki:Common.css 178.7.106.59 12:55, 29 April 2011 (UTC)

How to enable in 1.15?
Doing some searching I set:

$wgEnableMWSuggest = true;

$wgOpenSearchTemplate = true;

in LocalSettings.php

I also tried commenting out:

//$wgScriptExtension = ".php";

I just want to get the search bar suggestions to work. I believe this is supposed to be core functionality. How do I enable this?

Thanks.
 * It is a core functionality and should work (even without $wgOpenSearchTemplate = true;). Did you enable ajax? If not, simply add $wgUseAjax=true; in yout LocalSettings.php--Gregra 21:16, 2 September 2009 (UTC)

I tried this all but it won't work?

Jeremytmunn 16:22, 21 October 2009 (UTC)
 * When I change $wgScriptPath in LocalSettings.php, the AutoSuggest quits working.
 * I am using IIS and our DNS CNAME record points directly to the /wiki folder.
 * All of the pages show up find with $wgScriptPath = "/.", but like I said the AutoSuggest no longer works. Any idea why or is there a workaround?


 * I had this same problem. I opened the error console of Firefox and discovered that svn had messed the merging of some of the javascripts.  I got a fresh copy of skins/common/ and the problem was fixed.--JonathanWilliford 22:22, 2 August 2010 (UTC)

MWSuggest broken in 1.16x
After updating to the current trunk version, mwsuggest seems to be broken. There is, however, a JS-error: Line: 389 Error: document.forms[...].elements is null or no object. Code: 0 URL: Special:Search -- docMario, 02.08.2009, 22:59CET Addition: with the recent nightly dump, mwsuggest seems to work again. The error still occurs on the Special:search page with the "advanced" option activated. -- docMario, 14.08.2009, 03:10CET

$wgEnableMWSuggest shows only part of the articles
Hi, if I create many categories, than when I type "category:" it shows me in the suggest just part of the categories in alphabetic order. How do I define that the suggestion shows all the articles?

--Gregra 22:23, 5 August 2009 (UTC)

New Search Bar on site
i put a new search bar on my site it works but mwsuggest works sometimes.

1.17 search release
I can't get my search suggest to work anymore in the 1.17 version. It used to work in 1.15. Is there anything new I have to modify?

Search goes out of screen
I'm running the latest mediawiki with default vector skin, however, when i search for something with mwsuggest enabled the suggestions come up, but resize the screen in width to the right instead of aligning to the right corner like on the mediawiki. Am i really the only one with this issue?

Hiding Redirects
Is there an option or extension which hides redirect pages from the suggestions list? My wiki has quite a lot of them and they tend to clog it up, making suggestions almost useless. --Resplendent 01:12, 2 January 2011 (UTC)


 * I also would like to hide redirects from the suggestion list. I goggled a lot and found a discussion about this on bugzilla. It seems that the change was proposed but not implemented in the end. You can click on "diff" next to "proposed patch" to see the necessary changes. Does anyone have another solution? If not I will try to adapt my code like proposed. --Stefahn 16:48, 10 January 2011 (UTC)

Question
Is there any way to put the suggestions to appear when I type in all lowercase? For exemple: If I type "The Stone" appears. If I type "The stone" disappears. And, to take off redirects suggestions? --MatheuszFelipe 21:19, 19 April 2011 (UTC)

Problem
I am using MW1.16.2 and a custom monaco skin, i have followed the steps in the page and when things are typed into the search box suggestions come up but when they are selected I am taken to a blank search page and the search title in the page URL. Even typing in pages that don't exist takes you to a blank search page.

Localsettings.php reads as this:

$wgEnableMWSuggest = true; $wgOpenSearchTemplate = true;

Am I missing something? 203.51.68.110 13:06, 23 April 2011 (UTC)

Number of suggestions
How can specify the number of suggestions which are shown below the search box? If I enter "E" in my search box I won't get all articles starting with "E". :-(
 * In "/skins/common/mwsuggest.js", there is a parameter . --Kipmaster 14:28, 9 December 2011 (UTC)

Speed of Suggestions
Is there any way to show this suggest faster? it usually takes good 2-3 seconds for it to populate, but it'd be ideal it starts off the bat.

Anyone know how to do this?
 * The suggestion from Extension:Vector is much faster! (the default suggestion algorithm is automatically replaced when the extension is installed). --Kipmaster 14:19, 9 December 2011 (UTC)

change the location on the search suggestions
Please how can I change the location on the search suggestions, as I am using custom skin and I want to modify the location of the search suggestion --Mohamed Ouda 00:07, 29 July 2011 (UTC)

Is there a way to enable it so that redirect pages are also included?
Dc321 02:56, 29 August 2011 (UTC)