Extension:RigorousSearch
From MediaWiki.org
|
RigorousSearch Release status: stable |
|
|---|---|
| Implementation | Special page, Search |
| Description | Performs a slow, inefficient wiki search on the full page text. |
| Author(s) | JohanTheGhost |
| Version | 1.0.1 |
| MediaWiki | 1.7 |
| Download | RigorousSearch/1.0 |
| Added rights | uses patrol right |
Contents |
[edit] What can this extension do?
This extension implements a full-page search facility, by the tedious method of individually searching the source of each page as stored in the "page" / "text" tables -- not the FULLTEXT index kept in the "searchindex" table for MySQL searches.
This is very slow, and almost totally useless -- except that it allows searching of the complete page source, not just the user-visible version of the text stored in "searchindex". So, for example, if you want to search for hyperlinks to a particular web site, this will work, whereas a MediaWiki search would not ("searchindex" includes link text, but not the link URL). You can also use it to search for particular markup tags.
A useful application is to search for novice users making "http://..." links into the wiki instead of using regular wikilinks, which causes pages to appear orphaned when they're not.
- Note: Extension:LinkSearch can also search for particular
http://...links, and is much faster (but it wasn't around when RigorousSearch was originally written).
[edit] Usage
The extension creates a new special page, Special:RigorousSearch. Because it uses a lot of resources, access is restricted to users with "patrol" user rights (which by default means sysops). (You can change this easily enough; search for "patrol" in the code.)
You can invoke this feature in multiple ways:
- Go to
[[Special:RigorousSearch]], and fill in the search form. - Link to
[[Special:RigorousSearch/mypattern]]to do an immediate search for "mypattern". Due to URL processing, this won't work for patterns containing special characters, including multiple slashes (as in "http://..."). - Link to
[http://x/w/index.php?title=Special:RigorousSearch&pattern=mypattern]. This also does an immediate search for "mypattern", but you can use "%2F" escapes for slashes, etc.
Note that this is really slow. You should only use it when necessary, and you probably shouldn't use it on large wikis at all.
[edit] Installation
- Download the extension code:
- Version 1.0: known to work with PHP 5 and MW 1.7; may work on PHP 4.
- Save the code in your wiki's
extensionsdirectory asextensions/SpecialRigorousSearch.php.
[edit] Changes to LocalSettings.php
require_once("$IP/extensions/SpecialRigorousSearch.php");

