Page MenuHomePhabricator

Prefix search over all labels and aliases
Closed, ResolvedPublic


Provide a prefix search over all labels and aliases of a given language that returns the appropriate items.

Version: unspecified
Severity: normal
Whiteboard: storypoints: 5



Related Objects


Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:02 AM
bzimport set Reference to bz40391.
bzimport added a subscriber: Unknown Object (MLST).

I assume the idea is to create a function that does something similar to Change I6ea1f848: New function getFromTerm that searches over both aliases and labels, and provides the found entries to an api module wbsearchentities.

It could be argued that the function EntityHandler::getFromTerm should be called EntityHandler::getMatchingTerms if the terms are returned or EntityHandler::getMatchingEntities if the entities themself are returned or EntityHandler::getMatchingIds if the ids are returned. Depending on how the function is named it should return either ids or the entities or tuples of ids, label with language, description with language, alias with language, and score.

Perhaps the function(s) should be made so it returns the data with varying granularity. Ie. all three functions is made and the later builds on the former.


Note that Store::newTermCache comes from the interface and is defined in SqlStore. Also TermCache::getMatchingTerms comes from the interface and is defined in TermSqlCache.

Verified in Wikidata demo time for sprint 20