For a front-end search form?
One strategy I often use is concatenating the selector one input field at a time. Just make sure your add your validation.
Something like this:
$selector = '';
if($place = sanitizer()->selectorValue($input->post->place)) {
$input->whitelist('place', $place);
$selector .= ", place%=$place";
}
if($input->post->doctor) {
$input->whitelist('doctor', $input->post->doctor);
if($input->post->doctor == '1') {
$selector .= ", name=jim";
} elseif($input->post->doctor == '2') {
$selector .= ", name=jon";
} elseif($input->post->doctor == '3') {
$selector .= ", name=jake";
}
}
$limit = 12;
$template = doctor;
$parent = doctors;
$selector .= ", sort=sort, limit=$limit";
$selector = "template=$template, parent=$parent" . $selector;
$results = pages()->find->($selector);