Page MenuHomePhabricator

Filtering Autocomplete Results in Wikidata
Open, Needs TriagePublicFeature

Description

If a user currently wants to set color (P462) to magenta and types in magenta, the first result that they currently get is the Italian commune Magenta (Q42595) and not the color magenta. The user needs to read the item descriptions to find the correct magenta. For experienced users this is extra work to do. For new users, it makes it more complicated to understand Wikidata then it would be if the Italian commune would not be shown in autocomplete for color (P462).

Currently, the one-of constraint is taken into account while showing autocomplete results but other constraints aren't. If value-type constraint and none-of constraint would be taken into account, the user experience would improve. While Wikidata has a bunch of other constraints as well, most of them are not relevant to filtering out hits in autocomplete, so the don't need to be considered.

For queries of 1-4 characters, the results of the query for a given property could be cached for a month to save database query cost.  

Any item that violates the value-type constraint shouldn't be shown. For items that violate the none-of constraint the replacement item should be shown instead.

Related Objects

Event Timeline

Another example is that it would be best if only languages are shown or shown at the top when entering a value into the language of work or name property. One could store all the languages in the one-of constraint or something similar that affects the autocompletes. For example, one could query items that are instances of languages once a week and attach them to that input box as values that should be shown in autocomplete so all the other items are shown in grey so the user can easily see which ones are (most likely) the correct ones. Prior discussion is here.