Hi :)
I can't get Wildcard search in MediaWiki to work with PostgreSQL as the database backend.
Does anyone know how I can get it to work?
ps. I tried with PostgreSQL v8.2.9 and v8.3 "below" mediawiki v1.13.0 and v1.13.2
Best Regards, René V.
I can't get Wildcard search in MediaWiki to work with PostgreSQL as the database backend.
Does anyone know how I can get it to work?
By "Wildcard search", do you mean the search tweaks done by the Wildcard search "extension" or something else?
What exactly are you trying to get it to do? What terms are you searching on, and what results do you expect?
I have not installed any "extension".
I for instance can search for "rabbit" and find something, but find nothing by searching for "rabbi*" or "rabbi%".
I would like "MediaWiki search" to work like this: http://www.mediawiki.org/wiki/Extension:Wildcard_search which is included in the MediaWiki core now, BUT apparently not for PostgreSQL.
-----Oprindelig meddelelse----- Fra: Greg Sabino Mullane [mailto:greg@endpoint.com] Sendt: 15. oktober 2008 15:07 Til: MediaWiki announcements and site admin list Cc: rve@techno-matic.dk Emne: Re: [Mediawiki-l] Can't get Wildcard search in MediaWiki to work with PostgreSQL
I can't get Wildcard search in MediaWiki to work with PostgreSQL as the database backend.
Does anyone know how I can get it to work?
By "Wildcard search", do you mean the search tweaks done by the Wildcard search "extension" or something else?
What exactly are you trying to get it to do? What terms are you searching on, and what results do you expect?
-- Greg Sabino Mullane greg@endpoint.com End Point Corporation
René Vestergaard wrote:
I have not installed any "extension".
I for instance can search for "rabbit" and find something, but find nothing by searching for "rabbi*" or "rabbi%".
I would like "MediaWiki search" to work like this: http://www.mediawiki.org/wiki/Extension:Wildcard_search which is included in the MediaWiki core now, BUT apparently not for PostgreSQL.
Are you sure this is a bug and not a problem with your install? Simply searching for "mod" in my Posgres 8.3.x + MW 1.13.2 install returns matches for modes, model, modify, and so on.
Attempting to insert wildcard characters in the middle results in no return (i.e. bac*up does not match backup) but I don't know if this is the expected behavior.
-----Oprindelig meddelelse----- Fra: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] På vegne af Sean McAfee Sendt: 15. oktober 2008 16:15 Til: MediaWiki announcements and site admin list Emne: Re: [Mediawiki-l] Can't get Wildcard search in MediaWiki to work with PostgreSQL
René Vestergaard wrote:
I have not installed any "extension".
I for instance can search for "rabbit" and find something, but find nothing by searching for "rabbi*" or "rabbi%".
I would like "MediaWiki search" to work like this: http://www.mediawiki.org/wiki/Extension:Wildcard_search which is included in the MediaWiki core now, BUT apparently not for PostgreSQL.
Are you sure this is a bug and not a problem with your install? Simply searching for "mod" in my Posgres 8.3.x + MW 1.13.2 install returns matches for modes, model, modify, and so on.
Yes, I am sure. When i tested this with MySQL as back-end-database it worked, but I can not get it to work with PostgreSQL.
Attempting to insert wildcard characters in the middle results in no return (i.e. bac*up does not match backup) but I don't know if this is the expected behavior.
-- Sean McAfee System Engineer
Collaborative Fusion, Inc. smcafee@collaborativefusion.com 412-422-3463 x 4025
5849 Forbes Avenue Pittsburgh, PA 15217
IMPORTANT: This message contains confidential information and is intended only for the individual named. If the reader of this message is not an intended recipient (or the individual responsible for the delivery of this message to an intended recipient), please be advised that any re-use, dissemination, distribution or copying of this message is prohibited. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.
IMPORTANT: This message contains confidential information and is intended only for the individual named. If the reader of this message is not an intended recipient (or the individual responsible for the delivery of this message to an intended recipient), please be advised that any re-use, dissemination, distribution or copying of this message is prohibited. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
I for instance can search for "rabbit" and find something, but find nothing by searching for "rabbi*" or "rabbi%".
Searching (in Postgres on MediaWiki) works on word stemming, so that any search term is broken down to its base, and the base words are compared against an indexed. There is no support for searching arbitrary collections of letters, which seems to be what you want. Doing such a thing would be an extremely time-consuming task on all but the tiniest of wikis, as there is no way to index such arbitrary searches. If this is something you really wanted, however, you could probably write an extension and/or global flag to do the searching by producing SQL similar to:
SELECT * FROM page_content WHERE old_text ~ 'rabbi' WHERE ...
I found that the wildcard character (*) can't be use when i use PostgreSQL as the database for mediawiki, but only when i use MySQL database for the mediawiki.
After upgrading from PostgreSQL v8.3.3-1 to v8.3.4-1 the search works a bit better. Now MediaWiki can find articles with the word "skovningssystem" if I search for "skov". Unfortunately it still can't find articles with the word "TM2200" if I search for "TM" or "2200".
I want to thank Greg for his explanation about "word stemming". Now the search results make sense ;)
-----Oprindelig meddelelse----- Fra: Greg Sabino Mullane [mailto:greg@endpoint.com] Sendt: 16. oktober 2008 17:35 Til: MediaWiki announcements and site admin list Cc: rve@techno-matic.dk Emne: Re: [Mediawiki-l] Can't get Wildcard search in MediaWiki to work with PostgreSQL
I for instance can search for "rabbit" and find something, but find nothing by searching for "rabbi*" or "rabbi%".
Searching (in Postgres on MediaWiki) works on word stemming, so that any search term is broken down to its base, and the base words are compared against an indexed. There is no support for searching arbitrary collections of letters, which seems to be what you want. Doing such a thing would be an extremely time-consuming task on all but the tiniest of wikis, as there is no way to index such arbitrary searches. If this is something you really wanted, however, you could probably write an extension and/or global flag to do the searching by producing SQL similar to:
SELECT * FROM page_content WHERE old_text ~ 'rabbi' WHERE ...
-- Greg Sabino Mullane greg@endpoint.com End Point Corporation
mediawiki-l@lists.wikimedia.org