If you type "-discontinued" in the search bar, that will filter them out.
That works for other unwanted also such as designers, etc.
Don't need to do it that way as
the system automatically 'hides' discontinued patterns from search results. You can however click on the 'discontinued' box filter on the left to see all that are discontinued. I use this filter when I am looking for a specific pattern and not finding it in the search results. If it still does not show up in the 'discontinued' search, it was never on Ravelry.
......
Left side filters ---
Search result for category Accessories>Hat>Beret/Tam (188pgs, 8,986 matches - pattern photos shown). Your result may vary, as I have many patterns 'hidden' from searches, so therefore do not show up in my results.
....
Discontinued results -
shows 23 pages, 1165 pattern photos
If I want to see the ones in my libray that are discontinued, just also check 'in my library' and select AND: match all of these, it will only show those.