MediaWiki extensions manual
OOjs UI icon advanced-invert.svg
Math Search
Release status: unmaintained
Implementation Search, Special page
Description Integrates MathWeb Search engine
Author(s) Schubi87
Latest version 0.1.0 (July 2012)
MediaWiki 1.20+
Database changes Yes
Tables mathindex
License GNU General Public License 2.0 or later
Example FormulaSearchEngine
  • $wgMathSearchWikidataUrl
  • $wgMathAnalysisTableName
  • $wgMathDebug
  • $wgMathWmcMaxResults
  • $wgMathUploadEnabled
  • $wgMathSearchMWSUrl
  • $wgMathSearchInfoPage
  • $wgMathSearchTranslationUrl
  • $wgMathWmcServer
  • $wgMathSearchContentTexMaxLength
  • $wgMathUpdateObservations
  • $wgContentMathEnableWikibaseDataType
  • $wgMathSearchBaseXBackendUrl
Quarterly downloads 2 (Ranked 170th)
Translate the MathSearch extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

The MathSearch extension integrates the MathWeb Search engine as well as the BaseX search engine to MediaWiki.


This extension requires some preconfiguration effort. You should plan 15 to 20 minutes for the installation of the prerequisites.

  • Math Extension in LaTeXML mode see here
  • A local installation of the MathWeb Search daemon as described in here is recommended.
  • A local installation of the BaseX REST search as described here.

At the current stage of development only MySQL is supported as database type.

For some features Extension:SyntaxHighlight is required.


  • Download and place the file(s) in a directory called MathSearch in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php :
    require_once "$IP/extensions/MathSearch/MathSearch.php";
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parametersEdit

$wgMWSUrl: The link to your (local) MathWeb Search installation e.g. "http://localhost:8090";

$wgMathSearchBaseX: The link to your (local) BaseX installation e.g. "http://localhost:10043";

Text searchEdit

Text search works best with CirrusSearch, but the default MySQL search works as well.

Testing the Web SearchEdit

On MediaWiki with MathSearch extension installed, the Special:MathSearch page can be found. Here, Wikipages can be found by the tex or MathML expressions specified in the structured search-fields. Make sure, the indexing steps have been done before and MWS or BaseX is activated.


In order to use the MathSearch capabilities you have to create indexes for the formulas in your wiki. At the moment updates are not supported. So, you have to re-index every time the equations change. If you have frequent changes, it might be good to install a cron-job.

From the mediawiki root, run:

php extensions/MathSearch/maintenance/UpdateMath.php

then run:

php extensions/MathSearch/maintenance/CreateMWSHarvest.php /srv/mathsearch/mws-dump/ 30000 --mwsns="mws:"

This is the default (MWS_HARVEST_PATH="../data/wiki") path. If you have changed the path in /your/path/to/mediawiki/extensions/MathSearch/mws/config/mws_services.conf you have to specify another part