Extension:MWSearch

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

Release status: unmaintained

Implementation Search
Description Back-end for the MediaWiki Lucene-based search engine
Author(s) Brion Vibber and Kate Turner
MediaWiki 1.13+
Database changes No
License The MIT License
Download
Parameters
  • $wgLuceneHost
  • $wgLucenePort
  • $wgLuceneDisableSuggestions
  • $wgLuceneDisableTitleMatches
  • $wgLuceneSearchVersion
  • $wgLuceneUseRelated
  • $wgEnableLucenePrefixSearch
  • $wgLuceneSearchCacheExpiry
  • $wgLuceneSearchTimeout
Hooks used
PrefixSearchBackend

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

Check usage and version matrix; code metrics

Phabricator:

Open tasks · Report a bug

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

Note Note: Used by Wikimedia Foundation until 2014, but to be replaced by Extension:CirrusSearch.

Installation[edit | edit source]

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 extract the tarball in your extensions/ folder. It should generate a new folder called MWSearch directly inside your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/MWSearch/MWSearch.php";
$wgSearchType = 'LuceneSearch';
$wgLuceneHost = '192.168.0.1'; // 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
  • 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( "192.168.0.1", "192.168.0.2" );
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 | edit source]

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

See also[edit | edit source]