Lemmy is indexed so can be found on search engines while discord cant
For internal search without using a search engine discord has had way more devs, time and money thrown at it. Still would say its barely better than lemmy (just is cause of the time filters)