You can set up that only your Favorites can call you when the phone is in Do not disturb mode. But can you do the same for sms's? It looks like it doesn't filter sms's.
It will filter the SMS completely unless you're using your phone(screen is lit).
Did you try it? It doesnt seem to filter sms's. It looks like sms's from certain people cannot be whitelisted as voice calls can. Actually when you set up a Favorite contact it only let you make favorite the voice calls.