From 47949ff29a20a52d25687f438480119c04865e78 Mon Sep 17 00:00:00 2001 From: rurban Date: Tue, 12 Aug 2008 16:03:08 +0000 Subject: [PATCH] Fix the optimization with r1.32. SemanticSearch didn't work at all with exact strings (without wildcards) git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@6138 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/TextSearchQuery.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/TextSearchQuery.php b/lib/TextSearchQuery.php index abb603770..897f80b73 100644 --- a/lib/TextSearchQuery.php +++ b/lib/TextSearchQuery.php @@ -1,4 +1,4 @@ -_tree->_op = TSQ_TOK_ALL) return true; - if ($this->_tree->_op = TSQ_TOK_EXACT) return $this->_tree->word == $string; + if ($this->_tree->_op == TSQ_TOK_ALL) return true; + if ($this->_tree->_op == TSQ_TOK_EXACT) return $this->_tree->word == $string; return preg_match($this->asRegexp(), $string); } @@ -1187,6 +1187,9 @@ class TextSearchQuery_Lexer { } // $Log: not supported by cvs2svn $ +// Revision 1.33 2008/05/21 04:28:38 rurban +// for the previous pcre short-cut +// // Revision 1.32 2008/05/06 19:25:55 rurban // perfomance optimisation: do numeric checks. Change EXACT semantics: ignore case_exact, always do strcmp. Change WORD match to use \b word boundary checks // -- 2.45.0