diff options
| author | Sergey Kartashoff <gluke@php.net> | 2001-12-02 10:24:39 +0000 |
|---|---|---|
| committer | Sergey Kartashoff <gluke@php.net> | 2001-12-02 10:24:39 +0000 |
| commit | 77111db91234797e2409fcc71a0ed914b16e0ca3 (patch) | |
| tree | ec4a5a78e3dbde4e9e73b54531cf8b0dd92399df /ext/mnogosearch/index.php | |
| parent | 3c01151a080b35767f0bce1b1b6a619947b9ce79 (diff) | |
| download | php-git-77111db91234797e2409fcc71a0ed914b16e0ca3.tar.gz | |
- Added synonym stuff support to mnogosearch module. Slightly changed
stored API. Example updated.
Diffstat (limited to 'ext/mnogosearch/index.php')
| -rw-r--r-- | ext/mnogosearch/index.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/mnogosearch/index.php b/ext/mnogosearch/index.php index 60ac656f12..f7b70b5300 100644 --- a/ext/mnogosearch/index.php +++ b/ext/mnogosearch/index.php @@ -43,6 +43,8 @@ $spell_file['en']='/opt/udm/ispell/en.dict'; // $spell_file['ru']='/opt/udm/ispell/ru.dict'; $stopwordtable_arr[]='stopword'; // $stopwordfile_arr[]='stopwords.txt'; +$synonym_arr[]='/opt/udm/synonym/english.syn'; + $minwordlength=1; $maxwordlength=32; @@ -593,6 +595,14 @@ function make_nav($query_orig){ } } + if (Udm_Api_Version() >= 30203) { + for ($i=0; $i < count($synonym_arr); $i++) { + if ($synonym_arr[$i] != '') { + Udm_Set_Agent_Param($udm_agent,UDM_PARAM_SYNONYM,$synonym_arr[$i]); + } + } + } + if ($m=='any') { Udm_Set_Agent_Param($udm_agent,UDM_PARAM_SEARCH_MODE,UDM_MODE_ANY); } elseif ($m=='all') { |
