tldr: I think the search dropdown needs a more clear indication of the search context, as well as a way to modify the context.
I'm catching up a bit and just noticed that when reading an individual topic, the search dropdown will find you the posts which mention your search term (along with highlighting!), which is very nice. However, at the time I wanted to see other topics, so the in-page results were exactly what I didn't want, and even clicking the "show more" link next to "Topics" just found more results within the topic I already had open.
To find the search results I was hoping for, I just had to go back to the Discourse homepage. However, needing to do that struck me as odd — and I hadn't expected that the header search would change contexts like that.
I now see that on a profile page, the header search limits the context to the posts by that user, and on category pages, it "prefers results in [category name]". In those cases, the placeholder text on the search box specifies the context of what you're about to search. I think adjusting the placeholder text on the within-thread search needs to be done as well, as it still says "Type your search terms here" like when on the homepage.
That said, I think it's slightly too subtle to only modify the placeholder text so it describes the within-thread context. I don't have any brilliant ideas for how that would look, but read on...
I'd also like to flip the context from a more-specific one back to the full-site/homepage search. I was on a thread and expecting to be able to search the full site, so it was frustrating seeing only results from what I was already looking at. As I said earlier, needing to visit the homepage before being able to do that search felt odd.
So now I'm imagining a switch that can be flipped near the search results, which indicates that the results are from a within-thread search, and that flipping the switch will find results from a whole-site search. Could just be some links/buttons, could be a tab sort of interface for the list of results... I dunno.
Hope this makes sense...