Hi there, As we know, the difference between "Go" and "Search" buttons beside the search box is that "Go" first looks for article's title and first lists search results found in titles, and immediately goes to the indicated article if one is found. If "Go" fails to find an article, it then automatically executes "Search" which is a full-text search for the given words. However, it only works well for default namespaces. If the given keywords string is in articles under a customized namespace, the "Go" doesn't look for (or list) article titles first, which means there is no difference between "Go" and "Search". Is there any way to do to make the "Go" to work for customized namespaces? BTW, in case there is something to do with the search engine, I am using Lucene-search/MWSearch. Thanks in advance, Ross Xu
"Go" should work just fine for pages in other namespaces, as long as you're writing the full title - eg "Talk:Foo" not just "Foo".
If you want it to check the given text portion against *all* namespaces, that may require a little work.
I don't recall if we fixed it up to check plain titles against everything in $wgDefaultSearchNamespaces already, but it's probably not hard to rig up an extension to do that; I can't peek at the code just yet as I'm on a train. :)
-- brion On Oct 18, 2010 8:23 AM, "Ross Xu" rossxunix@yahoo.ca wrote:
Hi there, As we know, the difference between "Go" and "Search" buttons beside the
search box is that "Go" first looks for article's title and first lists search results found in titles, and immediately goes to the indicated article if one is found. If "Go" fails to find an article, it then automatically executes "Search" which is a full-text search for the given words.
However, it only works well for default namespaces. If the given keywords
string is in articles under a customized namespace, the "Go" doesn't look for (or list) article titles first, which means there is no difference between "Go" and "Search".
Is there any way to do to make the "Go" to work for customized namespaces?
BTW, in case there is something to do with the search engine, I am using
Lucene-search/MWSearch.
Thanks in advance, Ross Xu
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Use $wgNamespacesToBeSearchedDefault in LocalSearch.php as explained here:
http://www.mediawiki.org/wiki/Manual:$wgNamespacesToBeSearchedDefault
This article is also useful, and explains how to change the search defaults of existing users:
http://meta.wikimedia.org/wiki/MediaWiki_FAQ#How_do_I_change_default_user_pr eferences.3F
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Ross Xu Sent: Monday, October 18, 2010 8:20 AM To: mediawiki-l@lists.wikimedia.org Subject: [Mediawiki-l] "Go" doesn't search for article title first
Hi there, As we know, the difference between "Go" and "Search" buttons beside the search box is that "Go" first looks for article's title and first lists search results found in titles, and immediately goes to the indicated article if one is found. If "Go" fails to find an article, it then automatically executes "Search" which is a full-text search for the given words. However, it only works well for default namespaces. If the given keywords string is in articles under a customized namespace, the "Go" doesn't look for (or list) article titles first, which means there is no difference between "Go" and "Search". Is there any way to do to make the "Go" to work for customized namespaces? BTW, in case there is something to do with the search engine, I am using Lucene-search/MWSearch. Thanks in advance, Ross Xu
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
When searching for something, if its in another namespace that is set to be searched by default, it will find it (eg: searching for Images, and you have a page by that name in another NS such as help) and will list it as the first result but it won't auto redirect to the pae if that is what you're talking about, There is currently a open bug[1] about that. -Peachey
mediawiki-l@lists.wikimedia.org