Extension:LuceneSearch

From MediaWiki.org

Jump to: navigation, search
Crystal Clear app error.png

This extension is obsolete!
It has been replaced by MWSearch.

         

Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
LuceneSearch

Release status: beta

Implementation  Special page
Description Special page for Mediawiki Lucene-based search engine
Author(s)  Brion Vibber, Kate Turner
Last Version  2.0.2 (August 07, 2007)
MediaWiki  1.5 - 1.12
License No license specified
Download SVN

check usage (experimental)

Contents

[edit] Obsolete in 1.13

The extension will be deprecated in MW 1.13. User interface is getting merged into the MediaWiki core, and back-end is now a separate extension Extension:MWSearch.

[edit] What can this extension do?

Full-text search based on Lucene. Features:

  • distributed search/indexing
  • accentless search, stemmers for 12 languages
  • link analysis for ranking
  • namespace-prefixed queries

This extension is only the MediaWiki special page used to fetch results from MediaWiki Lucene-based search engine.

[edit] Installing MediaWiki Extension

First, install Extension:ExtensionFunctions.php. Then put into your LocalSettings.php. wgLuceneHost can be an array of hosts.

$wgDisableInternalSearch = true;
$wgDisableSearchUpdate = true;
$wgSearchType = 'LuceneSearch';
$wgLuceneHost = '127.0.0.1';
$wgLucenePort = 8123;
require_once("$IP/extensions/LuceneSearch/LuceneSearch.php");
$wgLuceneSearchVersion = 2;
$wgLuceneDisableSuggestions = true;
$wgLuceneDisableTitleMatches = true;

[edit] Using search (namespace) prefixes

Searches can be prefixed with canonical namespace names, or localized namespace names. E.g. entering into search box:

 help:images

will search the "Help" namespace for occurances of the word "images". There is also a special prefix all, which instructs the search engine to search everything (by default only the "main" namespace is searched).

Note that spaces are not allowed between the namespace name and the colon (:).

To search more than one namespace, comma-separate their names. e.g. help,project:images.

[edit] Customizing namespace prefixes

To specify custom prefixes that will combine different namespaces, edit MediaWiki:Searchaliases. Here is a sample entry:

wp|Project
all_talk|Talk,User_talk,Image_talk,MediaWiki_talk,Template_talk,Help_talk,Category_talk

So, the syntax is: "alias|<list of namespaces>" per line. Localize the all keyword by editing MediaWiki:searchall and adding localized names one per line.

[edit] Setting up the MediaWiki Lucene-based search engine

Please read Extension:lucene-search.