Page MenuHomePhabricator

Add search support for linter errors
Open, MediumPublic

Description

See feature request and discussion at https://www.mediawiki.org/wiki/Topic:Tyedpkv579q9d11e

SMalyshev has some suggestions there for how to provide this support. GeoData extension is recommended as a good reference extension for adding this functionality.

Event Timeline

ssastry created this task.Oct 5 2017, 10:01 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 5 2017, 10:01 PM
ssastry triaged this task as Medium priority.Oct 5 2017, 10:02 PM
Daimona added a subscriber: Daimona.Oct 6 2017, 8:11 PM
Elitre added a subscriber: Elitre.Nov 21 2017, 8:38 AM
cscott added a subscriber: cscott.Nov 21 2017, 2:46 PM

Copying some bits from the Flow thread to make this task more self-contained:

As asked in this topic, is there a way to search for Lint errors? e.g. a linterrors:misnested-tag to search pages in Special:LintErrors/misnested-tag? Thanks :)

Here is an example of the search that should be available. According to https://en.wikipedia.org/w/index.php?title=Barack_Obama&action=info, there is 1 Misnested Tags lint error. (There should be, but is not, a direct way to get more information about this error, with one click on this Information page.) If the user goes to the list all articles with Misnested tags at https://en.wikipedia.org/wiki/Special:LintErrors/misnested-tag?namespace=0, it should be possible to search there for the article Barack Obama, so one can get more information about the misnested tag and fix it.

If you want to do it from linter extension, you can use https://www.mediawiki.org/wiki/Manual:Hooks/SearchIndexFields for creating a new index field (you probably want keyword field, a field can have multiple values), https://www.mediawiki.org/wiki/Manual:Hooks/SearchDataForIndex for indexing the data and Manual:Hooks/CirrusSearchAddQueryFeatures for defining a new feature like linterrors:

You can look at GeoData extension which does it.

Ah, another note - if you follow the route I outlined above, you'd probably need to run some scripts to update index mappings. Ping people on #wikimedia-discovery about how to do it if you need help.

cscott added a subscriber: Jdforrester-WMF.

Added Discovery since some help from that team would be useful; the Parsing-Team doesn't really have experience with search, and so this will probably be a low-priority task for us w/o help.

debt added subscribers: Smalyshev, debt.

Let us know how we can help. :)

Izno added a subscriber: Izno.Dec 1 2018, 8:26 PM