Commit 76bd8b76 authored by zYne's avatar zYne

added more stopwords to analyzer

parent e10acab8
...@@ -51,6 +51,7 @@ class Doctrine_Search_Analyzer_Standard implements Doctrine_Search_Analyzer_Inte ...@@ -51,6 +51,7 @@ class Doctrine_Search_Analyzer_Standard implements Doctrine_Search_Analyzer_Inte
'almost', 'almost',
'along', 'along',
'also', 'also',
'although',
'amp', 'amp',
'an', 'an',
'and', 'and',
...@@ -66,6 +67,7 @@ class Doctrine_Search_Analyzer_Standard implements Doctrine_Search_Analyzer_Inte ...@@ -66,6 +67,7 @@ class Doctrine_Search_Analyzer_Standard implements Doctrine_Search_Analyzer_Inte
'be', 'be',
'because', 'because',
'been', 'been',
'before',
'being', 'being',
'best', 'best',
'better', 'better',
...@@ -99,6 +101,7 @@ class Doctrine_Search_Analyzer_Standard implements Doctrine_Search_Analyzer_Inte ...@@ -99,6 +101,7 @@ class Doctrine_Search_Analyzer_Standard implements Doctrine_Search_Analyzer_Inte
'easily', 'easily',
'easy', 'easy',
'edition', 'edition',
'either',
'end', 'end',
'enough', 'enough',
'even', 'even',
...@@ -266,7 +269,7 @@ class Doctrine_Search_Analyzer_Standard implements Doctrine_Search_Analyzer_Inte ...@@ -266,7 +269,7 @@ class Doctrine_Search_Analyzer_Standard implements Doctrine_Search_Analyzer_Inte
public function analyze($text) public function analyze($text)
{ {
$text = preg_replace('/[.()&#!,?^£@%&{}+]/', ' ', $text); $text = preg_replace('/[^A-Za-z0-9]/', ' ', $text);
$text = str_replace(' ', ' ', $text); $text = str_replace(' ', ' ', $text);
$terms = explode(' ', $text); $terms = explode(' ', $text);
...@@ -288,4 +291,4 @@ class Doctrine_Search_Analyzer_Standard implements Doctrine_Search_Analyzer_Inte ...@@ -288,4 +291,4 @@ class Doctrine_Search_Analyzer_Standard implements Doctrine_Search_Analyzer_Inte
} }
return $ret; return $ret;
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment