Lines Matching defs:term
563 * Wraps a search term in regex boundary checks.
565 * @param string $term
568 function ft_snippet_re_preprocess($term)
571 if (Asian::isAsianWords($term)) return $term;
584 if (str_starts_with($term, '\\*')) {
585 $term = substr($term, 2);
587 $term = $BL . $term;
590 if (str_ends_with($term, '\\*')) {
591 $term = substr($term, 0, -2);
593 $term .= $BR;
596 if ($term == $BL || $term == $BR || $term == $BL . $BR) $term = '';
597 return $term;
743 foreach ($terms as $term) {
745 if (preg_match('/^(-?)"(.+)"$/u', $term, $matches)) {
751 $term = str_replace('"', ' ', $term);
754 $term = str_replace(')', ' ) ', $term);
755 $term = str_replace('(', ' ( ', $term);
756 $term = str_replace('- (', ' -(', $term);
759 $term = str_replace('|', ' or ', $term);
761 // treat ideographic spaces (U+3000) as search term separators
763 $term = preg_replace('/[ \x{3000}]+/u', ' ', $term);
764 $term = trim($term);
765 if ($term === '') continue;
767 $tokens = explode(' ', $term);
926 * Transforms given search term into intermediate representation
933 * @param string $term
938 function ft_termParser($Indexer, $term, $consider_asian = true, $phrase_mode = false)
943 $words = Asian::splitAsianWords($term);
949 $term_noparen = str_replace(['(', ')'], ' ', $term);
955 } elseif ($words[0] === $term) {
958 $term_encoded = str_replace(['(', ')'], ['OP', 'CP'], $term);