thiemowmde added projects: MediaWiki-extensions-WikibaseRepository, Discovery-Search, Discovery, CirrusSearch.
thiemowmde added a subscriber: hoo.
thiemowmde triaged this task as "Normal" priority.
thiemowmde moved this task from incoming to ready to go on the Wikidata board.
thiemowmde added a comment.

The code that made this possible was in EntitySearchTermIndex::getEntityIdsMatchingSearchTerm, introduced via T117763. The idea was intentionally trivial:

  • The first step always tried to parse the users input as an entity ID.
  • If this fails, the regex /.*(\b\w{2,})/s tried to grep the last ASCII sequence from the users input, and parse that as an entity ID. This covers full URLs as well as copy-pastes like "(Q42)".
  • All this is cheap.
  • In addition the term table was queried in two steps: exact matches first, then prefix matches.

This code path is not executed any more with the switch to the new EntitySearchElastic implementation, introduced via T125500.

To bad we had no integration test for this feature.


TASK DETAIL
https://phabricator.wikimedia.org/T179061

WORKBOARD
https://phabricator.wikimedia.org/project/board/71/

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: thiemowmde
Cc: hoo, thiemowmde, Smalyshev, Multichill, Aklapper, Lydia_Pintscher, Lahi, GoranSMilovanovic, Jrbranaa, QZanden, EBjune, Avner, debt, Gehel, FloNight, Wikidata-bugs, aude, jayvdb, Mbch331, jeremyb
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to