Hi! Could I ask you to describe your situation a little bit in more details? :)
With best regards, Alexander Veremyev. smita wrote:
I have had similar issues with searching. Sometimes it works and and sometimes it just wont find anything. Also it indexes some words and ignores others. Any ideas why? Jan Pieper-2 wrote:I want to to implement a Lucene based search in my blog but it does not function. Yesterday morning it works but after I created the index new nothing works. -------------------------------------------------------------------------------- $index = new Zend_Search_Lucene($config->search->index, true); foreach($result as $row) { $doc = new Zend_Search_Lucene_Document(); $doc->addField(Zend_Search_Lucene_Field::UnIndexed( 'created', $row['writedate'] )); $doc->addField(Zend_Search_Lucene_Field::Text( 'title', $row['title'] )); $doc->addField(Zend_Search_Lucene_Field::Text( 'url', $config->site->url.'blog/entry/'.$row['id'] )); $doc->addField(Zend_Search_Lucene_Field::Text( 'content', $row['content'] )); $index->addDocument($doc); } $index->commit(); -------------------------------------------------------------------------------- The index will be created and I can search in it with Luke(http://www.getopt.org/luke/) but if I use the ZF-API nothing will be found :(-------------------------------------------------------------------------------- $index = new Zend_Search_Lucene($config->search->index); $hits = $index->find('intergenia'); foreach ($hits as $hit) { echo '[' . $hit->score. '] '. hit->title . '<br />'; echo $hit->url . '<br /><br />'; } -------------------------------------------------------------------------------- Where is the mistake? Is there a chance to use the GermanAnalyzer? -- Jan
