Page MenuHomePhabricator

Consolidate code backing the SearchEntities (wbsearchentities) module and the ItemDisambiguation special page.
Closed, ResolvedPublic1 Estimated Story Points

Description

The SearchEntities module and the SpecialItemDisambiguation special page serve the same purpose: the return a list of items that match a given label provided by the user. The necessary code should be consolidated into a TermSearchInteractor class that supports:

  • exact and prefix matches (case insensitive)
  • matches in any set of languages, considering language fallback
  • retrieving the id of the matching entities, along with
    • the matched term
    • label and description in the user's ui language (using fallback)
  • sensible ranking
  • adjustable limits
  • paging (if easily doable)

TermSearchInteractor, or the search service it uses, could be re-implemented easily based on different mechanism, like Elastic (see T88534 and T86949).

Event Timeline

daniel raised the priority of this task from to Needs Triage.
daniel updated the task description. (Show Details)
daniel subscribed.
daniel renamed this task from Consolidate code backing the SearchEntities module and the TermDisambiguation special page. to Consolidate code backing the SearchEntities (wbsearchentities) module and the ItemDisambiguation special page..May 19 2015, 6:51 PM
daniel updated the task description. (Show Details)
daniel set Security to None.
daniel updated the task description. (Show Details)

@daniel I am guessing TermDisambiguation here means SpecialItemDisambiguation?

@Addshore yea, sorry. will fix the description

Lydia_Pintscher moved this task from incoming to ready to go on the Wikidata board.
Lydia_Pintscher added a subscriber: Manybubbles.

Change 218349 had a related patch set uploaded (by Addshore):
Add OFFSET to TermIndex & implementations

https://gerrit.wikimedia.org/r/218349

Change 218607 had a related patch set uploaded (by Addshore):
Implement TermSearchInteractor

https://gerrit.wikimedia.org/r/218607

Change 219168 had a related patch set uploaded (by Addshore):
Use SearchInteractor in SearchEntities

https://gerrit.wikimedia.org/r/219168

Change 219169 had a related patch set uploaded (by Addshore):
Use SearchInteractor in SpecialItemDisambiguation

https://gerrit.wikimedia.org/r/219169

Change 218349 abandoned by Addshore:
Add OFFSET to TermIndex & implementations

Reason:
Let not do this now ;)

https://gerrit.wikimedia.org/r/218349

Change 218607 merged by jenkins-bot:
Implement TermSearchInteractor

https://gerrit.wikimedia.org/r/218607

Change 219168 merged by jenkins-bot:
Use SearchInteractor in SearchEntities

https://gerrit.wikimedia.org/r/219168

Change 219169 merged by jenkins-bot:
Use SearchInteractor in SpecialItemDisambiguation

https://gerrit.wikimedia.org/r/219169

daniel moved this task from Review to Done on the Wikidata-Sprint-2015-06-16 board.