EDIT:
Solved with a hack for now. Added at line 473:
if (isset($this->_termsFreqs[$termId][$docId])) {
}
This happens only when I'm searching for multiple words, e.g.:
+word1 +word2 + word3
I get this massive error:
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
Funny thing is that the result set that is returned is correct, so in production I could just turn off the error reporting and it would work like a charm but I don't want to do that.
Similar issue is documented here: http://framework.zend.com/issues/browse/ZF-5545
And apparently there is no solution.
I have also tried using UTF-8 compatible text analyzer (even though I have only Latin 1 characters in the index):
Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8());