WMDE Technical Wishes/AdvancedSearch

From Meta, a Wikimedia project coordination wiki

Advanced Search[edit]

The Advanced Search feature enhances Special:Search through an advanced parameters form and aims to improve the way how to configure namespaces. The advanced parameters form only shows already existing search options such as intitle that are currently only listed on help pages. The project has been kicked-off by a workshop series on advanced search in Germany in autumn 2016. After several workshops, tests and feedback rounds, the MediaWiki extension AdvancedSearch was developed. This new interface was available as a beta feature from the end of 2017, with more than 40.000 users across all wikis. Since November 2018, it's a default feature on all wikis.

How it works[edit]

Screenshot 1: This is what Special:Search looks like now.
Screenshot 2: Example for an Advanced Search: We're looking for a page containing the word "summer" and the exact text "sunny afternoon". The page we're looking for must not contain the text "summertime" or "blues", but either "jam", "jazz" or "music". The page must also contain the template "under construction".
Screenshot 3: The same query with collapsed bars

The Advanced Search extension adds two bars to the search form on Special:Search (screenshot 1):

  • Advanced search
  • Search in (namespaces)

You can reach Special:Search by clicking on the magnifying glass in the normal search field at the top of your wiki page.

Advanced search[edit]

Open the form by clicking on the "Advanced search" bar.

  • Search options (screenshot 2): You can combine different options to narrow down your search.
  • Help (screenshot 2): If you want to learn more about the parameters behind the queries (e.g. intitle), click on the help icons next to the search fields. You'll see a short explanation, which search syntax is used by this field.
  • Collapsed form (screenshot 3): When you collapse the form, all the search fields you have filled are shown as tags, each with a preview of the search terms inside them. You can empty the search fields by clicking on the X in a tag.

Search in (namespaces)[edit]

Screenshot 4: Search in specific namespaces. In this example, the namespaces "User" and "User talk" show up in the dropdown menu when "use" is typed.

The interface also allows to narrow down in which namespaces you want to search, e.g. only in articles, on user pages, on help pages etc. (screenshot 4).

  • You can select namespaces in different ways: type them, select them from a dropdown list or choose namespace presets such as "General Help". Select "All" to search in all namespaces.
  • You can combine different namespaces.
  • In the dropdown list, namespaces and their respective talk namespaces are bundled.
  • Selected namespaces are shown as tags. In the dropdown list, selected namespaces are highlighted with a checkmark.
  • You can remove selected namespaces individually by clicking on the "x" within a tag or by unchecking them in the dropdown. If you uncheck the "All" checkbox, all namespaces are deselected at once.

JavaScript[edit]

The new interface uses JavaScript. If you're not using JavaScript you will keep seeing the previous interface, without the advanced parameters form and with the old way of selecting namespaces.

Deactivating the new interface[edit]

If you prefer the previous interface, you can deactivate Advanced Search in your user preferences.

Adding new search fields to the interface[edit]

A hook in the Advanced Search extension allows gadgets or other extensions to add keywords to the advancedParameters panel. More information: documentation, T217446

Status[edit]

Deployment as a beta feature

  • Nov 21, 2017: Mediawiki.org and test.wikipedia.orgYesY
  • Nov 29, 2017: deWP and arWPYesY
  • Dez 6, 2017: huWP, faWP YesY
  • 2018: During the small beta phase, more features – such as support for additional keywords – were added, the namespace selection got improved and bugs were fixed. YesY
  • May 8, 2018: all other wikis YesY
  • September 20, 2018: Changes to the namespace dropdown, including bundling of namespaces and their talk namespaces, and checkboxes in the dropdown menu. YesY

Deployment as a default feature

  • Nov 8, 2018: mediawiki.org YesY
  • Nov 15, 2018: deWP, arWP, huWP, faWP YesY
  • Nov 28, 2018: all other wikis YesY

Several improvements

  • Mar 28, 2019: URLs created by Advanced Search are always unambiguous about the namespaces that are being used. (T217445) YesY
  • Apr 11, 2019: A hook allows adding new fields to the Advanced Search interface. YesY(documentation) (T217446)
  • Apr 11, 2019: The namespaces part is now collapsed by default. If you want to specify the namespaces of your search you can expand it and configure that. Otherwise the search will be performed in the default namespaces shown in the collapsed state as pills/tags. The “Remember selection for future searches” option is also “hidden” in the expandable part. (T217443) YesY


Links[edit]

Feedback[edit]

Comments or further ideas are very welcome! The best place for that is the central feedback page on Mediawiki.org. Thanks!