Hi Maurice,
Looks really useful, do we place the "*" in this function:
function legalSearchChars() {
return "A-Za-z_'0-9\\x80-\\xFF\\-";
}
If so where and how, otherwise, which one please.
Thanks,
Andrew
-----Original Message-----
From: mediawiki-l-bounces(a)Wikimedia.org
[mailto:mediawiki-l-bounces@Wikimedia.org]On Behalf Of Maurice Joseph
Sent: 22 September 2005 22:06
To: mediawiki-l(a)wikimedia.org
Subject: RE: [Mediawiki-l] mediawiki 1.4 & 1.5rc4, substring search,
how?
Did a little experimenting on my local install and here's my findings. Note,
I'm using mysql db.
Enabling the following debug flags helps display the pertinent content:
$wgDebugComments = true;
$wgDebugDumpSql = true;
Under ../includes/SearchMySQL.php contains the following function:
function searchText( $term ) {
$resultSet = $this->db->resultObject( $this->db->query(
$this->getQuery(
$this->filter( $term ), true ) ) );
return new MySQLSearchResultSet( $resultSet, $this->searchTerms );
}
Basically, filter() (in SearchEngine.php) defines what is a legal character.
Modify this constant to allow '*'. Now wildcards matches work.
Also, see
http://dev.mysql.com/doc/mysql/en/fulltext-boolean.html for details
about full text sql queries in MySQL.
Maurice Joseph
SpikeSource
developer.spikesource.com
Thanks for your post, Maurice.
Unfortunately the question is still unanswered.
The issue is not wildcards or no wildcards.
The problem - which I also experienced and could not fix jet - occurs when
the user only enters a substring without knowing the full word.
In WikiPedia you will find "Timesheets" by searching for
"Time","Times",
"Timesheet" or the full word "Timesheets"
In the MediaWiki default installation it does not work:
Only searching for "Timesheets" (i.e. the exact phrase) will return a hit.
The question of Thomas was
What must I do to get this work as it does in Wikipedia?
And so is mine!
Best regards
Thank you for your time and help.
Wolfgnag
Maurice Joseph wrote:
--
\\\//
( o o )
----------------------oOOo--(_)--oOOo-----------------------
------------------------------------------------------------
Wolfgang ZSALCSIK
Design Engineer - Electrical Design
AUSTRIAN AEROSPACE Ges.m.b.H.
Stachegasse 16
A-1120 Vienna, AUSTRIA / EUROPE
Tel. : +43-1-80199/5550
Fax : +43-1-80199/5577
E-Mail: wolfgang.zsalcsik(a)space.at
Internet:
http://www.space.at
====================================================
This email is for information only!
====================================================
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l