Just so I understand your suggestion correctly…
You want to filter the search results for a specific library – not restricting a library from showing in the search results in the first place?
Edit:
If so… there’s already an existing feature suggestion discussing such an option – in that case I suggest you comment/vote in that thread in order to avoid distracting/dispersing votes (and as a result closing this thread as a duplicate).