Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple autosuggest instant search below search input #1330

Open
Tracked by #1329
LukasKalbertodt opened this issue Feb 4, 2025 · 1 comment
Open
Tracked by #1329

Add simple autosuggest instant search below search input #1330

LukasKalbertodt opened this issue Feb 4, 2025 · 1 comment
Labels
area:search Related to Tobira's search needs:decision Needs a decision of some kind (discussion thread)

Comments

@LukasKalbertodt
Copy link
Member

In #1322 we removed instant search from Tobira, but we had the idea of adding a minimal instant search below the search bar, a bit like YouTube and many other sites. This can help the user to quickly complete a search when they see a suggestion while typing, and it also helps the user kind of discover what to search for. And further, it gives instant feedback to what is being typed, which feels nice. The goal for this minimal instant search is that it's very fast though! So no complex rendering and very fast backend search times.

I think there are two main ways we can implement that. And both could be mixed.

  • (a) Only search through the data we have (e.g. event/series/playlist titles)
  • (b) Save queries users are searching for in our DB and search through that

(b) is closer to Google and YouTube work I think: they suggest what others have searched for already. The results are not really reflecting any result data, but just that this search term was previously search for. But this requires us to store more data, keep another search index and it opens a bunch of open questions (how often needs a term to be searched for before it is suggest? How to avoid students just searching for "sex sex hahaha" a million times via bot, to avoid that being the suggestion whenever someone inserts s into the search bar? Google and YouTube use word filters for that).

Using (a) would be easier: we could just search through item titles (which is done very quickly in the backend). The question is how to present the results. Say the user searches for "algo" and say there are three videos all called "Algorithms and Data Structures", all part of a series of the same name. Since the results should be very simple (maybe just one line of text), we can't just show all these 4 results, as they would look exactly the same to the user. We could collect all result titles, convert them to lower case, deduplicate them and show that. Clicking on the entry "algorithms and data structures" would send the user to the proper search page with that search query. That in turn would show the four results as one would expect. That would mean that these suggestion always lead to the search page, never to the actual result already. But one could also show actual results in the quick search already in some cases. Say the search term only matches one video really well, then one could show that slightly differently in the drop down list and clicking on that would immediately lead to the video (similar to how your browser's address bar works: some results will lead to immediately to the website, some are just ones that lead you to the google search page).

@LukasKalbertodt LukasKalbertodt added area:search Related to Tobira's search needs:decision Needs a decision of some kind (discussion thread) labels Feb 4, 2025
@LukasKalbertodt LukasKalbertodt mentioned this issue Feb 4, 2025
12 tasks
@oas777
Copy link
Collaborator

oas777 commented Feb 4, 2025

Ignore this if we're not supposed to comment yet:

a) would be more of the same search we're already using to help overcome the missing instant search and
b) would be a new twist to search (while collecting user data to do so)?

Thanks also for catching the "How to avoid students just searching for "sex sex hahaha" a million times via bot" issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:search Related to Tobira's search needs:decision Needs a decision of some kind (discussion thread)
Projects
None yet
Development

No branches or pull requests

2 participants