Jump to content

Extension:WSSemanticParsedText

From mediawiki.org
MediaWiki extensions manual
WSSemanticParsedText
Release status: beta
Implementation Hook
Description This extension extends Semantic MediaWiki to provide full-text search with parsed wikitext.
Author(s) Wikibase Solutions
Latest version 2.1.1 (2023-05-11)
MediaWiki >= 1.31.0
Database changes Yes
License GNU General Public License 2.0 or later
Download

The WSSemanticParsedText extension extends Semantic MediaWiki to provide full-text search with parsed wikitext. This extension replaces the raw wikitext search with stripped parsed wikitext search.

The extension works by overriding the ElasticFactory used while indexing with an ElasticFactory that provides a new Indexer object that overrides the fetchNativeData function to return (stripped) parsed wikitext instead of raw wikitext.

Installation

[edit]
This extension requires Semantic MediaWiki with ElasticStore configured.
  • Download and place the file(s) in a directory called WSSemanticParsedText in your extensions/ folder.
  • Only when installing from Git, run Composer to install PHP dependencies, by issuing composer install --no-dev in the extension directory. (See task T173141 for potential complications.)
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'WSSemanticParsedText' );
    $smwgElasticsearchConfig["indexer"]["raw.text"] = true;
    
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  • Run the following script from the root of your installation directory:
php extensions/SemanticMediaWiki/maintenance/rebuildElasticIndex.php
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.