I have a page which displays the videos from a channel. I have a search box which filters the videos displayed based on the input. However, the videos are always sorted in reverse order if I use order=relevance
I tried changing this to order=date which gives me the newest videos first but at the expense of search not working so well. With order=relevance search works with any matching text but order=date only seems to work with video title.
So, my question is, is it possible to have order=relevance AND sort the display order so newest video is first?
I don’t think you can do this with the YouTube API. I also don’t think the search will be affected by the sort type. I would create a video and put something like ‘ajlsdf9ih9agoihq3r4g8’ in the description. Then search for that and sort by date and see if it returns. If so - then it would seem that the sort order just makes it seem like the description isn’t being accessed for search.
Wouldn’t it be possible to get the result and then sort afterwards based on the date?
Hi Chad,
Thanks for replying. When I use order by relevance, I can enter a speaker name, ie Andrew and all the videos featuring that name are shown. If I do the same with order by date then I see fewer or no results depending on the search string. Its really odd. As an example.
I didn’t know if the results could be sorted afterwards but will look further into that. Wappler has so much functionality, I tend to get lost sometimes.