編輯:Zend_Search_Lucene的大規模 - 類似ZF-5545的問題
用劈解決現在。新增的行473:
if (isset($this->_termsFreqs[$termId][$docId])) {
}
這種情況僅在我搜索多個單詞,如:
+word1 +word2 + word3
我得到這個巨大的錯誤:
Notice: Undefined offset: 2 in C:\wamp\www\project\library\Zend\Search\Lucene\Search\Query\MultiTerm.php on line 473
Notice: Undefined offset: 2 in C:\wamp\www\project\library\Zend\Search\Lucene\Search\Query\MultiTerm.php on line 473
Notice: Undefined offset: 4 in C:\wamp\www\project\library\Zend\Search\Lucene\Search\Query\MultiTerm.php on line 473
Notice: Undefined offset: 4 in C:\wamp\www\project\library\Zend\Search\Lucene\Search\Query\MultiTerm.php on line 473
Notice: Undefined offset: 6 in C:\wamp\www\project\library\Zend\Search\Lucene\Search\Query\MultiTerm.php on line 473
Notice: Undefined offset: 6 in C:\wamp\www\project\library\Zend\Search\Lucene\Search\Query\MultiTerm.php on line 473
Notice: Undefined offset: 1 in C:\wamp\www\project\library\Zend\Search\Lucene\Search\Query\MultiTerm.php on line 473
Notice: Undefined offset: 1 in C:\wamp\www\project\library\Zend\Search\Lucene\Search\Query\MultiTerm.php on line 473
Notice: Undefined offset: 9 in C:\wamp\www\project\library\Zend\Search\Lucene\Search\Query\MultiTerm.php on line 473
Notice: Undefined offset: 9 in C:\wamp\www\project\library\Zend\Search\Lucene\Search\Query\MultiTerm.php on line 473
滑稽事情是,返回的結果集是正確的,所以在生產中我可以關閉錯誤報告,它會像魅力一樣工作但我不想這樣做。
類似的問題在這裏是:http://framework.zend.com/issues/browse/ZF-5545
而顯然沒有辦法解決。
我一直在使用UTF-8兼容的文本分析(即使我有在指數只有拉丁文1個字符),也試過:
Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8());
我已經這樣做了,但仍然出現錯誤。 – 2009-08-08 17:28:59
看來$ docId沒有定義。 – 2009-08-08 17:30:40
嘗試向if添加&& isset($ docId) – Cahlroisse 2009-08-09 11:49:48