Jump to content

Extension talk:AdvancedSearch

About this board

Discussion page for technical answers around the Extension AdvancedSearch.

TomyLee (talkcontribs)

I found out that i need the Extension Extension:BetaFeatures to enable this extension. But stil after i enable this extension with the new "Beta" menu it still don't show anything only the search bar is visible but no menues. So maybe there are additional requirements for installation?

--TomyLee (talk) 14:13, 2 February 2018 (UTC)

Addshore (talkcontribs)

Hi @TomyLee.

The BetaFeatures extension should not be required by the extension. If this is a case than we should file a BUG and get that fixed!

However as @Jkmartindale says below you do need to have CirrusSearch!

~~~~

Jkmartindale (talkcontribs)

Hide namespace options

2
Summary by Thiemo Kreuz (WMDE)
Pretor~nowiki (talkcontribs)

How can I hide the options for selecting namespaces and only show the advanced options drop-down?

Pretor~nowiki (talkcontribs)

Ok, so I see that it is an ongoing discussion on the namespace-field options.


But I would really like to use the AdvancedSearch extension like it was before; without the namespace-field. On my wiki it's not needed to choose a namespace to search, becouse everything needed to be searched for is in the main namespace (68.000 articles).


So how can I hide/dissable the namespace-field and options and still have the advanced search option?

Remove namespace pane

2
Summary by Thiemo Kreuz (WMDE)

Unclear why this is needed.

Pretor~nowiki (talkcontribs)

Is it possible to remove the namespace pane (force it not to load) and keep the advanced search pane?

Gabriel Birke (WMDE) (talkcontribs)

At the moment there is no setting. It should be relatively simple to implement, maybe you can propose such a setting on Phabricator?

As a workaround for your own installation, you can edit the file modules/ext.advancedSearch.init.js and remove/comment out the lines

$advancedSearch.append( buildNamespacesPaneElement(
   state,
   headerContainer,
   namespacePresets,
   namespaceSelection,
   searchableNamespaces
) );

That will disable the namespaces without ill effects.

Trilotat (talkcontribs)

When clicking on the "i" button for information, the Sorting Order, Description says, "Change the sorting order of results. The standard is that most relevant pagest..."


"pagest" should be "pages."


Also, could "title" be an option?

Michael Schönitzer (WMDE) (talkcontribs)

Thanks! I reported it to the developers: T229216

Revansx (talkcontribs)

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)

Jo Woehrstein (talkcontribs)

Somehow I cannot find real clear details on how search by relevance works in advanced search. Does anyone have details?

Thiemo Kreuz (WMDE) (talkcontribs)

Unfortunately it's hard to tell what you mean when you say "how it works"? There is a dedicated "sorting order" field in the AdvancedSearch interface you can play around with. Maybe you are looking for Help:CirrusSearch?

Reply to "Seach by relevance?"

Question:How can I use AdvancedSearch on mobile?

1
Summary by Thiemo Kreuz (WMDE)

Should be fixed by now.

103.196.22.125 (talkcontribs)

I only see it on desktop but mobile

MimeTypeConfigurator.php error on line 49

2
Summary by Thiemo Kreuz (WMDE)

Fixed.

Tompouls (talkcontribs)

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

Thiemo Kreuz (WMDE) (talkcontribs)

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.

Suggestion: Implement ability to search for files by size

2
Summary last edited by Thiemo Kreuz (WMDE) 11:08, 17 April 2024 3 months ago

This possible via commons:Special:MediaSearch.

197.235.52.125 (talkcontribs)

As a user, I'd like to search files by size, so that I can find files of certain quality or simply a sample files.


Proposed solution

Implement the filesize filter that applies to all files.

Christoph Jauera (WMDE) (talkcontribs)

How to set a custom namespace preset as default

3
Summary by Thiemo Kreuz (WMDE)
Krabina (talkcontribs)

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.

Krabina (talkcontribs)

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

Thiemo Kreuz (WMDE) (talkcontribs)

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!

Reply to "How to set a custom namespace preset as default"