summaryrefslogtreecommitdiff
path: root/buildscripts/texbuilder/create_index.php
diff options
context:
space:
mode:
authorwei <>2006-05-09 11:54:05 +0000
committerwei <>2006-05-09 11:54:05 +0000
commit37cc48d6bfdc71f3cb47219ccc173ab32c4ba446 (patch)
tree595d855d499ce8ec99298fa5821dcd64eb3db78e /buildscripts/texbuilder/create_index.php
parent702fb4a66d473fb1ee98aaa81cd26b4813279ef8 (diff)
Update quickstart search index
Diffstat (limited to 'buildscripts/texbuilder/create_index.php')
-rw-r--r--buildscripts/texbuilder/create_index.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/buildscripts/texbuilder/create_index.php b/buildscripts/texbuilder/create_index.php
index db72c453..b451473d 100644
--- a/buildscripts/texbuilder/create_index.php
+++ b/buildscripts/texbuilder/create_index.php
@@ -1,7 +1,10 @@
<?php
// Create quickstart search index
-require_once (dirname(__FILE__).'/Zend/Search/Lucene.php');
+$zend_path = realpath(dirname(__FILE__).'/../../demos/quickstart/protected/index');
+set_include_path(get_include_path().';'.$zend_path);
+require_once ('Zend/Search/Lucene.php');
+
class quickstart_index
{
@@ -31,7 +34,7 @@ class quickstart_index
//searchable text
$doc->addField(Zend_Search_Lucene_Field::Keyword('page', strtolower($headers['title'])));
- $body = strtolower($this->sanitize($headers['content']));
+ $body = strtolower($this->sanitize($headers['content'])).' '.strtolower($headers['title']);
$doc->addField(Zend_Search_Lucene_Field::Unstored('contents',$body));
$this->_index->addDocument($doc);
}