summaryrefslogtreecommitdiff
path: root/ext/mnogosearch
diff options
context:
space:
mode:
authorSergey Kartashoff <gluke@php.net>2001-12-10 07:21:50 +0000
committerSergey Kartashoff <gluke@php.net>2001-12-10 07:21:50 +0000
commit678613b9d88b520f66389c2a8a488b219a7deace (patch)
tree78fa4559bddb04890e8cf5b12f1da8bba7c86e26 /ext/mnogosearch
parentf9f46598a9063ce77bc4d56ed8fb59d6ef014907 (diff)
downloadphp-git-678613b9d88b520f66389c2a8a488b219a7deace.tar.gz
- mnogosearch example updated to include searchd support
Diffstat (limited to 'ext/mnogosearch')
-rw-r--r--ext/mnogosearch/index.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/mnogosearch/index.php b/ext/mnogosearch/index.php
index f7b70b5300..e9a4d0ff07 100644
--- a/ext/mnogosearch/index.php
+++ b/ext/mnogosearch/index.php
@@ -44,6 +44,7 @@ $spell_file['en']='/opt/udm/ispell/en.dict';
$stopwordtable_arr[]='stopword';
// $stopwordfile_arr[]='stopwords.txt';
$synonym_arr[]='/opt/udm/synonym/english.syn';
+$searchd_arr[]='localhost';
$minwordlength=1;
$maxwordlength=32;
@@ -601,6 +602,15 @@ function make_nav($query_orig){
Udm_Set_Agent_Param($udm_agent,UDM_PARAM_SYNONYM,$synonym_arr[$i]);
}
}
+
+ for ($i=0; $i < count($searchd_arr); $i++) {
+ if ($searchd_arr[$i] != '') {
+ Udm_Set_Agent_Param($udm_agent,UDM_PARAM_SEARCHD,$searchd_arr[$i]);
+ }
+ }
+
+ Udm_Set_Agent_Param($udm_agent,UDM_PARAM_QSTRING,$QUERY_STRING);
+ Udm_Set_Agent_Param($udm_agent,UDM_PARAM_REMOTE_ADDR,$REMOTE_ADDR);
}
if ($m=='any') {