From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png

Release status:Extension status unmaintained

ImplementationTemplate:Extension#type Search
DescriptionTemplate:Extension#description Back-end for the MediaWiki Lucene-based search engine
Author(s)Template:Extension#username Brion Vibber and Kate Turner
MediaWikiTemplate:Extension#mediawiki 1.13+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license MIT License
  • $wgLuceneHost
  • $wgLucenePort
  • $wgLuceneDisableSuggestions
  • $wgLuceneDisableTitleMatches
  • $wgLuceneSearchVersion
  • $wgLuceneUseRelated
  • $wgEnableLucenePrefixSearch
  • $wgLuceneSearchCacheExpiry
  • $wgLuceneSearchTimeout
Hooks usedTemplate:Extension#hook

Translate the MWSearch extension if it is available at translatewiki.net

Check usage and version matrix.


Open tasks ยท Report a bug

The MWSearch extension is a MediaWiki backend to fetch search results from MediaWiki Lucene-based search engine.

Note Note: Was used by Wikimedia Foundation until 2014, then replaced by Extension:CirrusSearch.


If you haven't already, install the Extension:Lucene-search extension first. That is the search backend that this extension uses, it is required.
  • Download and place the file(s) in a directory called MWSearch in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/MWSearch/MWSearch.php";
$wgSearchType = 'LuceneSearch';
$wgLuceneHost = ''; // IP address of the server
$wgLucenePort = 8123;
$wgLuceneSearchVersion = 2.1; // comment this out if you are using the old version 2.0
  • Install the search engine
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To load-balance with from multiple servers:

$wgLuceneHost = array( "", "" );
If used on a Gentoo based server make sure dev-lang/php was emerged with the curl USE flag set, otherwise search attempts will fail because nothing will be sent to the lsearchd.

Installing the search engine[edit]

Lucene-search daemon needs to be running on the specified host(s). For instructions see Extension:Lucene-search.

See also[edit]