private function addSearchTermsToList($searchTerms, &$list, $wildcard)
    {
        foreach ($searchTerms as $term) {
            if ($term != '') {
                if ($wildcard && substr($term, -1) === '?') {
                    $term = substr($term, 0, -1) . $wildcard;
                }
                $list[] = $term;
            }
        }
    }