From 60c15d7deb9c53bcb1cf7881f441744bb29a6b63 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 15 Feb 2008 18:46:53 +0100 Subject: better highlighting for phrase searches FS#1193 This patch makes the highlighting of phrases in search snippets and on the pages itself much better. Now a regexp gets passed to the ?s darcs-hash:20080215174653-7ad00-cd2d6f7d408db7b7dd3cb9974c3eb27f3a9baeac.gz --- inc/indexer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/indexer.php') diff --git a/inc/indexer.php b/inc/indexer.php index 12e774579..ff2d332dc 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -615,7 +615,7 @@ function idx_tokenizer($string,&$stopwords,$wc=false){ if(preg_match('/[^0-9A-Za-z]/u', $string)){ // handle asian chars as single words (may fail on older PHP version) - $asia = @preg_replace('/('.IDX_ASIAN1.'|'.IDX_ASIAN2.'|'.IDX_ASIAN3.')/u',' \1 ',$string); + $asia = @preg_replace('/('.IDX_ASIAN.')/u',' \1 ',$string); if(!is_null($asia)) $string = $asia; //recover from regexp failure $arr = explode(' ', utf8_stripspecials($string,' ','\._\-:'.$wc)); -- cgit v1.2.3