Page MenuHomePhabricator

Haslabel treats aliases as labels
Open, MediumPublic

Description

For example see https://www.wikidata.org/w/index.php?title=Special:Search&limit=20&offset=20&profile=default&search=haslabel%3Akhw&advancedSearch-current={}&ns0=1&ns120=1, this returns a lot of items with khw alias instead of label. See also https://www.wikidata.org/wiki/Q13610143?action=cirrusdump.

I proposed to introduce some new keywords:

  • hasalias
  • haslabeloralias
  • haslabel (existing, will search labels only)
  • inalias
  • inlabeloralias
  • inlabel (existing, will search labels only)

Change the behavior of existing haslabel and inlabel may be considered a breaking change.

Event Timeline

dcausse triaged this task as Medium priority.Apr 8 2020, 6:40 PM
dcausse moved this task from needs triage to Wikibase Search on the Discovery-Search board.
dcausse added a subscriber: dcausse.

Aliases were put in the labels field for performance reasons, we need to investigated whether it's feasible or not to add an alias field (note that due to the multilingual nature of wikidata this is something we have to ponder carefully because the current strategy is to add one field per language).