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

Search through subtitles #955

Merged
merged 5 commits into from
Mar 6, 2023
Merged

Search through subtitles #955

merged 5 commits into from
Mar 6, 2023

Conversation

joschahenningsen
Copy link
Sponsor Member

Motivation and Context

This PR implements searching through the subtitles of an individual stream, allowing students to quickly find a topic in them.
Course-wide search could be a follow up.

Related to #796

Description

This PR adds

  • A cron job that exports all subtitles to meilisearch once a day
  • a search bar that calls a new api which internally asks meilisearch for related results
  • a popup on the watch page that displays the results and allows jumping to the timestamp of the subtitle

Steps for Testing

Prerequisites:

  • 1 vod with subtitles
  • a running meilisearch instance
docker run -it --rm \
    -p 7700:7700 \
    -e MEILI_MASTER_KEY='MASTER_KEY'\
    -v $(pwd)/meili_data:/meili_data \
    getmeili/meilisearch:v0.30 \
    meilisearch --env="development"
  • that is configured in config.yml
meili:
  host: http://localhost:7700
  apiKey: MASTER_KEY
  1. Log in
  2. Navigate to /admin/maintenance and run the meili export cron job
  3. navigate to vod and test the search functionality

Screenshots

out.mp4

@github-actions
Copy link

github-actions bot commented Mar 5, 2023

Your Testserver will be ready at https://955.test.live.mm.rbg.tum.de in a few minutes.

Logins
Kurs1 Kurs2 Kurs3 Kurs4
public public loggedin enrolled
prof1 prof1 prof2 prof1
prof2
student1
student2
student3
student1
student2
student2
student3
student1
student2

@mono424
Copy link
Collaborator

mono424 commented Mar 6, 2023

This unbelievably sexy!!!!!!

Copy link
Collaborator

@MatthiasReumann MatthiasReumann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how but you read my mind, I was about to suggest that feature next Wednesday!
Works great, Looks great 💯

What's your take on this: Do you think we could already implement a TUM-Live "complete" search using Meili? e.g. for the new start page.

Added some minor request changes.

api/search.go Outdated Show resolved Hide resolved
web/ts/TUMLiveVjs.ts Outdated Show resolved Hide resolved
@joschahenningsen
Copy link
Sponsor Member Author

Do you think we could already implement a TUM-Live "complete" search using Meili? e.g. for the new start page.

Definitely a feature I want! But currently not really feasible in my opinion until we have more subtitles. If a user had a search now they would always only find results in the one lecture with subtitles which might be confusing.

Copy link
Collaborator

@MatthiasReumann MatthiasReumann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great thanks ⚡

@joschahenningsen joschahenningsen merged commit fc1c3c5 into dev Mar 6, 2023
@joschahenningsen joschahenningsen deleted the subtitle-search branch March 6, 2023 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants