Hi Guys,
I have a little Problem with Lucene and I hope that somebody has a solution for this.
I integrated the Lucene System into my Yii project and everthing works well
(Search and so on).
I wanted to index all phtml Files for the Search.
My question: Is there a function to get all the View files from a project or directory?
I can do this with a Iterator myself but if there is a core function, that would be better.
Thanks for ideas
Jan
$docs = array('http://localhost/yii/homepage/index.php?r=site/index');
foreach ($docs as $doc) {
$document = new Zend_Search_Lucene_Document();
$document = Zend_Search_Lucene_Document_Html::loadHTMLFile($doc);
$document->addField(Zend_Search_Lucene_Field::unStored('id', $doc));
$document->addField(Zend_Search_Lucene_Field::Text('url', $doc));
$document->addField(Zend_Search_Lucene_Field::Text('title', $document->title));
$document->addField(Zend_Search_Lucene_Field::Text('content', $document->body));
//$document->addField(Zend_Search_Lucene_Field::Text('language', $document->language));
$index->addDocument($document);
$index->commit();
}