Video: implement search for video
Closed this issue · 3 comments
Implement an API, that can return ids/links to certain search terms.
We want the following to be taken into account for search terms:
- Username
- title
- description
It would be smart to implement this with binary search ;)
Update: We discussed, that we will search for Video-MetaData and User-MetaData. The API will return an array of videos and an array of users, in a json object.
Update: Search is working! BUT the SQL Statements are case-sensitive, we could fix that if we try every case option on the query string and retry the SQL Query, but this will have a very bad performance I guess.
Tbh since the default way people type is low-case, we could just optimise for that and only also check capitalized versions.
So a search like cool ultra Videos
would result in us checking cool ultra Videos
, Cool ultra Videos
cool Ultra Videos
and Cool Ultra Videos
.
This does result in a 2^n complexity (with n being the number of uncapitalized words, however since you only really search for 1-2 words, I think it's fine to default to the behavior you suggested @LukasLJL