Skip to content

search: enrich lucky search suggestions

Warren Gifford requested to merge rvt/lucky-summary-x into main

Created by: rvantonder

lucky search currently notifies the user of alternative queries that ran, even when those queries return 0 results. This PR collects the count of results coming from each generated query and only sends the notification if we found results.

Screen Shot 2022-06-23 at 12 39 32 PM

Pretty cool! Yes, this needs more bookkeeping overhead but it's so valuable I think it's worth it. The previous state is OK for a small number of suggestions, but as the query generation grows, this is going to get out of hand.

Aside: generated query job cancellation appears to not work, it's supposed to also not notify if we've already sent 500+ results total. I've never seen the context cancelled abort lucky search in this code block locally, and I've tried to force it to. This is a separate issue to investigate and shouldn't block this PR though.

Test plan

Experimental and will add a test, putting up for early review/feedback.

Merge request reports

Loading