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 http://www.mediawiki.org/wiki/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)

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.

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.