Jump to content

Extension talk:Wildcard search

Add topic
From mediawiki.org
Latest comment: 16 years ago by Subfader in topic It's standard now at least in MW 1.12

I tried and got it to work on MediaWiki 1.6.7 with MySQL 5. --Flominator 08:57, 8 August 2007 (UTC)Reply

with 1.11, PHP5 and MySQL 5 as well. --Flominator 11:32, 2 October 2007 (UTC)Reply

Mediawiki 1.10.1

[edit]

Got it to work on MediaWiki 1.10.1 by using 'static'

class SearchMySQLwildcards extends SearchMySQL4 {
//      function legalSearchChars() {
        static function legalSearchChars() {
                //include + and * as valid characters
                return "A-Za-z_'0-9\\x80-\\xFF\\-+*";
        }
}

--Hakuin 12:14, 8 August 2007 (UTC)Reply

Without the keyword "static", returns the error

Fatal error: Cannot make static method SearchEngine::legalSearchChars() non static in class SearchMySQLwildcards in /www/htdocs/mediawiki-1.10.1/extensions/SearchMySQLwildcards/SearchMySQLwildcards.php on line 14

--Mstroh 01:37, 16 August 2007 (UTC)Reply

Information in different Wiki

[edit]

Some people like to write comments here :-/ : [ http://assela.pathirana.net/Talk:Wildcard_Search_Extension ]

--Hakuin 12:14, 8 August 2007 (UTC)Reply

Doesn't work with MW 1.9.3

[edit]

Did a basic search with "*" and no results; should return all articles! —Eep² 04:07, 14 August 2007 (UTC)Reply

Because the minimum length for a word is by default four characters. So try to search for some* to find 'something'. -— Preceding unsigned comment added by 87.193.144.202 (talk • contribs) 01:46, August 22, 2007
Well, that's lame...not even "****" works then--oops. And, per Manual:$wgDBminWordLen, having to dork with the database (and rebuild a table) just to change the minimum search length is lame...(especially on shared hosting webspace providers where access to the database server isn't there). Oddly, "w*" returns all pages that start with "w", despite being only 1 character... —Eep² 10:34, 22 August 2007 (UTC)Reply


Doesnt work

[edit]

Linuxfan 22:09, 28 September 2007 (UTC)Reply

Seems to be a problem with MW 1.11. I asked the developer here. --Flominator 10:28, 2 October 2007 (UTC)Reply
Solved. --Flominator 11:29, 2 October 2007 (UTC)Reply
It is working but how i can make it search *something* without *-marks? Or at least something*. 21 Nov 2007

It works with the Mediawiki 1.7.1 version.

[edit]

I just installed it and it works just as I wanted. Thank you for sharing this extension! Todu 12:15, 26 November 2007 (UTC)Reply

Update: It does not work to search using two '*' characters:
Lets say I want to find a page that contain the word "oxymoron" and use the search phrase "*xymoro*". I will then get zero results.
"oxym*r*n" does not work either.

Can you fix this or maybe even make it possible to use regular expressions in the search box?
Todu 13:45, 26 November 2007 (UTC)Reply

Wildcard in front of term

[edit]

It would be useful to enable wildcards in front of the word.
*wiki will find Wiki, Mediawiki.
*wiki* will find Wiki, Mediawiki, Wikipedia, Superwikisuper. --Subfader 14:10, 28 February 2008 (UTC)Reply

It's standard now at least in MW 1.12

[edit]

This WildCard search is standard now at least in MW 1.12 if not ealier. Maybe change the intro text. --Subfader 14:35, 17 March 2008 (UTC)Reply

Only works with * at end, doesn't follow word order?

[edit]

If I put a star at the beginning or in the middle, it doesn't seem to work.

For example: search t*n returns tools, which doesn't contain an n. Also, *ls doesn't return anything, even though I know tools exists.

Cannot modify header information

[edit]

When I try to install it on a MW 1.11.2 I get the following Error-Message Warning: Cannot modify header information - headers already sent by (output started at /var/lib/mediawiki/extensions/wildcardsearch/SearchMySQLwildcards.php:31) in /usr/share/mediawiki/includes/WebResponse.php on line 10 -- Jan 11:51, 16 May 2009 (CEST)