Page MenuHomePhabricator

Completion Suggester: Searching for a subpage title using the search bar at the top of the page doesn't propose it for autocomplete
Closed, ResolvedPublic

Description

With the completion suggester (currently-beta) feature enabled...

If a subpage like Blah/Yada exists, typing Yada into the search bar at the top of a page doesn't offer any auto-complete suggestions. I think it should treat the page title as if it were "Yada" for search purposes, since to a human, the page title really is Yada. The fact that it happens to be a sub-page is irrelevant. My test case on mediawiki was Team Practices Group/Glossary.

I filed a separate similar task for basic prefix search..

Event Timeline

ksmith raised the priority of this task from to Needs Triage.
ksmith updated the task description. (Show Details)
ksmith updated the task description. (Show Details)
ksmith set Security to None.
EBernhardson moved this task from Needs triage to Search on the Discovery board.Feb 11 2016, 11:24 PM

the wider question revolves around how to tokenize the completion suggester. Today it maintains the same functionality it had before, where it had to be a strict prefix from the very beginning. This is something we very much could support, although there is a question of how much bigger it makes the index (since the completion suggester index has to be stored in memory).

iirc we were planning to revisit this after updating to the new version of elasticsearch completion suggester, which relaxes some of the requirement to store the entire completion search data structure in java heap

Restricted Application added a project: Discovery-Search. · View Herald TranscriptAug 18 2016, 10:56 PM
debt triaged this task as Normal priority.Aug 22 2016, 9:52 PM
debt moved this task from needs triage to This Quarter on the Discovery-Search board.
debt added a subscriber: debt.

Let's do some homework on this and see how big it would make the index. We can make the decision to work on it (or not) after that.

Change 308755 had a related patch set uploaded (by DCausse):
CompletionSuggester: add support for subphrase/subpage suggestions

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

I've built 4 new completion suggester indices:

Unfortunately the impact on the index size is not negligible (with replicas you need to multiply by 3):

  • mw.org with subpages: 2 534 391 vs 1 863 375
  • mw.org with subphrases: 3 522 931 vs 1 863 375
  • enwikisource with subpages: 84 667 658 vs 55 566 373
  • enwikisource with subphrases: 169 753 118 vs 55 566 373

If this feature is really useful we should enable it on a case by case basis, one option would be to reduce the number of replicas from 2 to 1 for these wikis.

I've lost the little html demo we used to evaluate the completion suggester, should I take some time to rebuild one to compare current vs. subpages vs subphrases?

EBernhardson added a comment.EditedSep 7 2016, 8:02 PM

I threw together a quick js demo like we had on suggesty in the past, it works from any relforge-search domain at /w/completion-demo.html, as in:

http://mw-sug-subpages-relforge.wmflabs.org/w/completion-demo.html

To make it slightly harder to lose like the code on suggesty, also made a pastie: P3995

debt added a comment.Sep 8 2016, 10:09 PM

Let's review the demo and see how things are looking

Change 308755 merged by jenkins-bot:
CompletionSuggester: add support for subphrase/subpage suggestions

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

Change 281468 had a related patch set uploaded (by DCausse):
Allow user to customize search suggestion profile.

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

Change 281468 merged by jenkins-bot:
Allow users to customize search suggestion profile

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

debt closed this task as Resolved.Sep 23 2016, 9:00 PM

Code work is done, this will be deployed with T146208