Filtering versus Search for

So, will filter work only the results visible on the page?

As per the solution for comparing list with a list as given on this page one needs to filter only to achieve desired result.

Would that solution not work if this is the behaviour? Also, is the solution mentioned on that page the only way to do it? Ideally I wanted a way to do it in search but couldn’t find a way.

Thanks,
Mukesh