How to call a Zend lucene search function?

Here's some code to create an index from scratch.

Here's some code to create an index from scratch: Zend_Search_Lucene_Analysis_Analyzer::setDefault(new StandardAnalyzer_Analyzer_Standard_English()); $tmpIndexDir = '/your/index/dir/' $index = Zend_Search_Lucene::create($tmpIndexDir); foreach($myObjects as $myObject){ $doc = new Zend_Search_Lucene_Document(); $doc->addField(Zend_Search_Lucene_Field::UnIndexed('objectId', $myObject->getId())); $contents = $myObject->toString(); $contentsField = Zend_Search_Lucene_Field::Text('contents', $contents); $doc->addField($contentsField); $index->addDocument($doc); } $index->optimize(); ... don't remember where I got the standard analyzer from...

Good examples - ZendFramework-1.9.6/demos/Zend/Search/Lucene ZF full distro.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions