How to search/filter either referenced field or regular field?

Is there another way of doing this?