0
public function searchIndex($entity)
{
//http://framework.zend.com/manual/2.0/en/modules/zendsearch.lucene.searching.html#
//http://stackoverflow.com/questions/7805996/zend-search-lucene-matches
//http://framework.zend.com/manual/2.0/en/modules/zendsearch.lucene.index-creation.html
try {
$index = Lucene::open($this->getOptions()->getIndexDir());
$index->optimize();
echo '<p>Index optimized.</p>';
} catch (Exception $e) {
throw new Exception("Search index not configured", 1);
}
$query = QueryParser::parse($entity->getTerm());
$hits = $index->find($query);
//print_r($hits);
$entity->setCount(count($hits));
//save the search for reference
$this->create($entity);
return $hits;
}
Каждый раз, когда я действительно выполнять поиск в моем ZEND сайте, это дает мне нулевой результат, пожалуйста, скажите мне кто-то, как выполнить индексирование в Зенд.Как мы можем сделать весь сайт переиндексацию поиска Lucene