Page MenuHomePhabricator

Replace VE's use of prefix search for link/template/image suggestions with full text search
Closed, ResolvedPublic0 Estimated Story Points

Description

Just added a link for Queen Esther Marrow; had misspelled it as Queen Ester Marrow (missing "h").

A search on-wiki for "Queen Ester Marrow" (misspelled, no h) correctly suggests "did you mean Queen Esther Marrow"?

Could the link dialog do the same auto-suggest, at least when there are no results?

Event Timeline

LuisVilla raised the priority of this task from to Needs Triage.
LuisVilla updated the task description. (Show Details)
LuisVilla added a project: VisualEditor.
LuisVilla added a subscriber: LuisVilla.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 18 2015, 11:51 PM

Could the link dialog do the same auto-suggest, at least when there are no results?

Yes, if we threw a huge amount of money at the search cluster, but that's really a question for Discovery.

@Deskana?

Jdforrester-WMF renamed this task from link search is prefix-based? to Replace VE's use of prefix search for link/template/image suggestions with full text search.Sep 24 2015, 5:43 PM
Jdforrester-WMF set Security to None.
Deskana added a comment.EditedSep 24 2015, 5:48 PM

Hard to say. In principle I think it should be fine from a performance standpoint, but I'd suggest doing some kind of load test.

I should point out that the last time I did an audit comparing prefixsearch to fulltext, it came up pretty inconclusive which one is better. This bug points out one of the cases where fulltext is better, but there are numerous cases where prefixsearch is better. So I'd also suggest doing some kind of test to validate the assumption that fulltext is actually better than prefix for the link dialogue.

Jdforrester-WMF triaged this task as Low priority.Sep 24 2015, 5:49 PM
Jdforrester-WMF moved this task from To Triage to Freezer on the VisualEditor board.

What if this was just switched to the new completion suggestion api instead?

https://en.wikipedia.org/w/api.php?action=cirrus-suggest&text=Queen+Ester+Marrow

This api is speifically setup to take thousands of api calls per second to replace the existing type-as-you-search.

note i don't think VE should call cirrus-suggest directly, we are integrating that into the core opensearch. If necessary we can add a new api call in core specifically for suggestions, the cirrus-suggest api is *experimental* and will be deleted.

What if this was just switched to the new completion suggestion api instead?

https://en.wikipedia.org/w/api.php?action=cirrus-suggest&text=Queen+Ester+Marrow

This api is speifically setup to take thousands of api calls per second to replace the existing type-as-you-search.

Definitely a possibility too, although realistically that API is not yet validated by Discovery as being production-quality from a product perspective.

All to what Erik said: full-text search is not designed for search as you type and should be ideally triggered only when the user has done typing his query.
Completion suggester is certainly the right solution to do this as it is designed for search as you type and can handle small typos.
I'd suggest not to implement a solution based on full-text search.

Deskana moved this task from Needs triage to Tracking on the Discovery board.

This task is not actionable by Discovery at the stage, so I removed it from our sprint and put it back in the backlog.

The solution in future would probably be:

  1. Discovery to productionise completion suggester API, and announce that it is done.
  2. Editing to change VisualEditor to use new completion suggester API.

Realistically, this is not a super high priority issue for either Editing or Discovery at present, so I wouldn't expect much movement on either end.

Deskana closed this task as Declined.Aug 30 2016, 6:51 PM

Now that the completion suggester has been released to production, this should fix the kind of issues that this task was aimed to fix. This significantly improves the search in VisualEditor (and for other search clients). As such, closing this task as "declined" since we have another solution that works in production.

FWIW, the autosuggester fixes the problem I had when I initially filed this bug, so thanks! and agree with the close.

FWIW, the autosuggester fixes the problem I had when I initially filed this bug, so thanks! and agree with the close.

Glad to hear it! :-)

Proof:

I'd actually say this is effectively Resolved by Discovery, but that's Deskana's call. :-)

Deskana changed the task status from Declined to Resolved.Aug 30 2016, 7:02 PM

I'd actually say this is effectively Resolved by Discovery, but that's Deskana's call. :-)

I'll take that. ;-)

Jdforrester-WMF set the point value for this task to 0.Aug 31 2016, 7:19 PM