Page MenuHomePhabricator

SERP widget for Wiktionary - getting it ready for A/B (or beta) test on enwiki
Open, MediumPublic


We'd like to use a widget that @Jdrewniak has been working on - as a beta (test) for English Wikipedia. This widget is using an experimental API that displays a definition from English Wiktionary, based on the query imputed and is only displayed on the search engine results page (SERP) if a definition is found.

wiktionary-sample.png (105×654 px, 22 KB)

To view this widget - add in the following to your common.js file on

importScript( 'User:JDrewniak_(WMF)/wiktionaryDefinitionInSearchResults.js' ); Backlink: [[User:JDrewniak_(WMF)/wiktionaryDefinitionInSearchResults.js]]

Before this widget can get to a full beta status, there are a few things we'd like to update:

  • add link to the actual definition shown by using the 'Definition' word as the link
  • add link to a search results page on for all results for the definition, using the '' word as the link
  • experimental API might need to be updated to:
    • expose the obsolete flag so that we can disregard that entry (and not display obsolete entries)
    • display the most common definition
  • when displayed with the sister project search results, don't have the sister project results pushed down the page on the right hand side:

wiktionary-explore similar-sister project sample.png (795×1 px, 314 KB)

  • also, there is a known issue where the wiktionary widget displays (oftentimes) a different definition than what we show in the sister project search results. This is because the experimental API for the wiktionary widget displays the first result it finds and the sister project search results displays the top ranked/used definition. Let's see if we can get these definitions synced up. Here's a screenshot of an example:

wiktionary-diff-results-for-serp.png (862×1 px, 396 KB)

Event Timeline

debt renamed this task from SERP widget for Wiktionary - getting it ready for a beta test on enwiki to SERP widget for Wiktionary - getting it ready for A/B (or beta) test on enwiki.Mar 21 2017, 4:21 PM

I've created a test account on enwiki for and testing will begin in the next week or so; we'll commence an A/B test soon as well.

We're taking a look at this—to see if we can possibly add it as a gadget for users to turn on in their preferences.

Moving this to the backlog for now, as other priorities have surfaced.