I could not find any documentation on how to set a custom made namespace preset as default. I was able to set a custom namespace preset, but "Default" will always be the one checked by default. User have to manually select the new one every time.
Extension talk:AdvancedSearch
Furthermore, the labeling does not work. I set
$wgAdvancedSearchNamespacePresets = [ 'preset-kma' => [ 'enabled' => true, // indication that this preset should be shown to the user 'namespaces' => [ '0', '2', '6', '12', '14' ], // list of namespaces to include in this preset 'label' => 'advancedsearch-namespaces-preset-kma' // id of the translation to use to label the prese> ], ];
Which works, but setting the File "MediaWiki:Advancedsearch-namespaces-preset-kma" does not display the label
I think you are looking for $wgNamespacesToBeSearchedDefault. You probably don't even need a custom preset when you use this instead.
In case you end with two defaults – your new one and the build-in one – add 'defaultNamespaces' => [ 'enabled' => false ],
to your $wgAdvancedSearchNamespacePresets configuration to remove the build-in default.
The problem with the label turns out to be an oversight. At the moment only some pre-defined messages can be used. I don't think this limitation is intentional and created phab:T352204 to fix it. Thanks a lot for reporting this!
Dear,
On a new docker installation MW 1.39.1, PHP 8.1.15, MariaDB 10.10.2, Elastic Search 7.10.2 we get the following error with the AdvancedSearch extension enabled when doing a search:
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in var/www/html/extensions/AdvancedSearch/includes/MimeTypeConfigurator.php on line 49
When AdvancedSearch is disabled, the Elastic Search works properly.
Tom
This was fixed a few months ago via gerrit:856121. Unfortunately this was not backported to version 1.39. I uploaded gerrit:887354 to do that now.
The enhancement of Special:Search by providing an advanced parameters form and improving how namespaces for a search query are selected seems quite helpful.
My wiki's run on shared hosting plans so using using Extension:CirrusSearch (Elasticsearch) is not possible.
During my initial testing without having Extension:CirrusSearch installed everything still seems to work as expected. So I am left to ask what functionality requires having Extension:CirrusSearch and whether or not this can be installed on wiki's without Extension:CirrusSearch.
Most of the "advanced" search features work only when using an ElasticSearch backend, like search based on categorization, templates used, source text... Namespace selection is something that should work on the default search.
I don't know if the extension detect the missing CirrusSearch extension and hide those advanced fields automatically, or it blindly assumes "it should work" and the search backend is ignoring them
Thank you. I'll investigate that in more detail.
Unfortunately the extension was developed with Wikimedia wikis in mind where CirrusSearch is available everywhere. Technically it would be possible to make it more flexible and e.g. hide some fields. We are happy to help with tickets and patches, but currently don't have the resources to implement and maintain such a non-Wikimedia mode.
Understood. Thank you. It just seems like something that might be helpful on my wiki's and early experiments showed it working without CirrusSearch. As @Ciencia Al Poder mentions further testing has shown most of the "advanced" features do require CirrusSearch.
Just recently installed Cirrus (elastic) search, works fantastic, and on top of that installed Advanced search extension too. I found that Advanced search window shows only to logged in users, anonymous users see only 3 dots as if trying to load something. Search works but the Advanced window does not show. Any idea what the root cause might be? Environment: MediaWiki 1.38.2, PHP 7.4.30 (fpm-fcgi), MariaDB 10.8.3-MariaDB, ICU 71.1, LilyPond 2.22.2, Elasticsearch 6.8.23.
You'll have to open the development console of your browser (hit F12 hey) and look for errors on it.
If you load the URL with the debug=true parameter it should display more detailed information.
Skipped unavailable module ext.advancedSearch.init load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector:8
resolveStubbornly @ load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector:8
This page is using the deprecated ResourceLoader module "mediawiki.ui". Special:Search:260 Please use OOUI instead. (anonymous) @ Special:Search:260
Looks strange, wiki is up-to-date.
"Skipped unavailable module XXXX" usually happens when a new extension is installed, and the page is cached by a frontend cache (varnish, squid, CloudFlare...), which often happens for unregistered users. The page contains the list of available ResourceLoader modules and their metadata (in the RLSTATE variable), but the URL load.php?lang=en&modules=startup&only=scripts contains the dependencies between modules, and it's out of sync.
You'll have to purge the server cache or CloudFlare, or let it clear itself after some time...
Thanks a lot. I purged and it shows correctly for anonymous users as well.
Is there a way to change "cat loves goat" to something else? It's cute and all, but it would be nice to change this to something a little more on-brand.
On your wiki, this is controlled by a page named MediaWiki:advancedsearch-placeholder-exact-text you can edit that page to change it.
Hi,
I would like to present a list of search options (standard, advanced, drilldown etc.) and let the users choose. When linking to Advanced Search (Special:Search) is it possible to set a parameter in the URL to have the advanced pane to be open instead of being collapsed?
This is currently not possibly, sorry. You can create a phab: task so we don't forget about this idea. Personally, I think it's a good one. However, I can't tell if and when it might be implemented as there is currently no active development happening on this extension.
hello. I agree with that idea.
I only see it on desktop but mobile
As a user, I'd like to be able to sort search results by last edited dates by ascending order.
As a user, I'd like to be able to sort page creation dates by ascending order, so that I can read the most recent pages about a topic.
As a user, I'd like to be able to sort page creation dates by ascending order, so that I can view the recent files / images (from the file namespace) matching my interests.
Hey and thanks for your question! If you uses the AdvancedSearch interface you already can set the sort order as described. Just chose "Edit date - current on top" or "Creation date - current on top" in the "Sorting order" drop-down in the expanded interface.
Well, the current sort is based on last to first, compare descending edits (starting from 13 August 2019 -> 1 October 2012) - www.mediawiki.org/w/index.php?title=Special:Search/monkey&sort=last_edit_desc while www.mediawiki.org/w/index.php?title=Special:Search/monkey&sort=last_edit_asc shows results in the ascending direction (from 12 October 2012 to 13 August 2019 ).
The same applies to creation date. So if the current dropdown options are to be followed, it would need two extra items namely "Edit date - current at bottom" or "Creation date - current at bottom", or something like that.
I'll second this. If you add the ascending key manually you get a strange "advancedsearch-sort-unknown", see: https://www.mediawiki.org/w/index.php?search=foo&sort=create_timestamp_asc
Product | Version |
---|---|
MediaWiki | 1.33.0 |
PHP | 7.2.24-0ubuntu0.18.04.1 (fpm-fcgi) |
MySQL | 5.7.28-0ubuntu0.18.04.4 |
ICU | 60.2 |
Elasticsearch | 6.5.4 |
AdvancedSearch | 0.1.0 (76eea63) 16:40, 25 March 2019 | GPL-2.0-or-later | Easy access to advanced search capabilities on Special:Search | Thiemo Kreuz, Gabriel Birke, Tonina Zhelyazkova, Christoph Jauera, Kai Nissen and Tim Eulitz |
CirrusSearch | 0.2 (2daa9b8) 09:07, 25 March 2019 | GPL-2.0-or-later | Elasticsearch-powered search for MediaWiki | Nik Everett, Chad Horohoe, Erik Bernhardson and others |
Elastica | 6.0.2 (eee38b0) 07:37, 10 September 2019 | GPL-2.0-or-later | Base Elasticsearch functionality for other extensions by providing Elastica library | Nik Everett and Chad Horohoe |
I'm sure this is something I just haven't configured correctly, but can someone point me to how this should be configured?
I'm trying to search multiple categories with Advanced Search. Using the default setup in CirrusSearch, which appears to be
$wgCirrusSearchCategoryEndpoint = '';
and getting the following message:
$wgCirrusSearchCategoryEndpoint should be set to a valid SPARQL endpoint to use deep category search.
So it makes sense that I'm getting the error, I just don't know what this endpoint should look like.
Any assistance?
i think [not sure] in wikimedia it uses blazegraph (https://query.wikidata.org) for the deep category thing
Right, but I would want this for just within my own wiki.
so you i imagine you would have to setup your own blazegraph instance. I have no idea how complicated that is but https://www.mediawiki.org/wiki/Wikidata_Query_Service/Implementation might be helpful
What I don't understand really is why it's using DeepCat at all. What i'm looking for in the instance of THISWORD but not THATWORD in 5 different categories, but none of them are Subcategories....
Seems like a lot of work for something that sounds so simple...I suppose I will look for a workaround, since for such a small wiki, this seems like way more work with not a lot of benefit.
Great extension. Thanks!
Please add a feature to allow users to find and select categories to search in the same way that namespaces are selected (as tokens). Thanks! Revansx (talk) 15:20, 24 October 2019 (UTC)