Steps to replicate the issue (include links if applicable):
- Upload a PDF document to a wiki, where CirrusSearch is set up
- Search for a search term available in the PDF. There will be no results, since the File: namespace will not be searched by default
- Manually select Namespace "File:". Now the PDF file will show in the search results as it should.
The same process fails when you set $wgNamespacesToBeSearchedDefault
- add $wgNamespacesToBeSearchedDefault[NS_FILE]=true; in LocalSettingsphp
- try the exact same search again. You will see that the File namespace is correctly set. However NO result is being displayed.
- the URL created by the search matches the one created before with manual selection of the FILE namespace
- if you remove the setting and reload the page, the result is there again
So I guess this is some kind of incompatibility of Cirrus search with this option.
My setup:
MediaWiki: 1.35.8
PHP 7.4.3-4ubuntu2.18 (fpm-fcgi)
MariaDB 10.3.38-MariaDB-0ubuntu0.20.04.1
ICU 66.1
Elasticsearch 6.8.23
CirrusSearch 6.5.4 (73cc125) 07:18, 13. Jun. 2022
Elastica 6.1.3 (ea8d452) 07:24, 23. Mai 2022