These search dogs do discriminate scent e.g. they are given an article of the missing persons clothing and will then hunt for a trail that matches that scent.
Once the dog finds the scent they will ‘indicate‘ the trail to the handler and then they will follow the trail to the missing person.
On finding the missing person the dog will ‘indicate‘ the find to the handler who then ‘rewards‘ the dog with their favourite toy and/or food whilst heaping lots of praise on them.
It is this ‘game’ through years of training that drives the dog to find the missing person.