ZF-4113: Exception opening index on 64bit platforms

Issue Type: Patch Created: 2008-08-29T02:13:30.000+0000 Last Updated: 2009-06-19T04:45:06.000+0000 Status: Resolved Fix version(s): - 1.8.4 (23/Jun/09)

Reporter: Ivan Lopez (ivan) Assignee: Alexander Veremyev (alexander) Tags: - Zend_Search_Lucene

Related issues: - ZF-4071



I had this exception trying to open a Lucene 2.3 index on 64bit platform:

PHP Notice: Uninitialized string offset: 0 in Zend/Search/Lucene/Storage/File.php on line 161 PHP Notice: Uninitialized string offset: 1 in Zend/Search/Lucene/Storage/File.php on line 162 PHP Notice: Uninitialized string offset: 2 in Zend/Search/Lucene/Storage/File.php on line 163 PHP Notice: Uninitialized string offset: 3 in Zend/Search/Lucene/Storage/File.php on line 164 PHP Fatal error: Uncaught exception 'Zend_Search_Lucene_Exception' with message 'Separate norm files are not supported. Optimize index to use it with Zend_Search_Lucene.' in Zend/Search/Lucene.php:431 Stack trace:

0 Zend/Search/Lucene.php(526): Zend_Search_Lucene->_readSegmentsFile()

1 test_lucene.php(40): Zend_Search_Lucene->__construct('/var/indices/es...')

2 {main}

thrown in Zend/Search/Lucene.php on line 431

The problem seems to be fixed applying this patch:

--- old/Zend/Search/Lucene.php 2008-07-25 20:58:53.000000000 +0200 +++ new/Zend/Search/Lucene.php 2008-08-29 11:11:01.000000000 +0200 @@ -404,7 +404,7 @@ if ($this->_formatVersion == self::FORMAT_2_3) { $docStoreOffset = $segmentsFile->readInt();

  • if ($docStoreOffset != -1) {
  • if ($docStoreOffset != (int)0xFFFFFFFF) { $docStoreSegment = $segmentsFile->readString(); $docStoreIsCompoundFile = $segmentsFile->readByte();

Possibly related to unresolved issue ZF-4071


Posted by Zoran Lazic (zoki) on 2008-09-16T06:18:14.000+0000

This problem still persists.

Fix/patch provided in here works, however thing should be fixed in svn too.

r11416 is still without this fix.

Posted by Karsten Dambekalns (k-fish) on 2008-11-15T10:30:42.000+0000

We could reproduce the issue today, the attached patch fixed it.

Posted by Karsten Dambekalns (k-fish) on 2009-01-21T08:30:25.000+0000

Still open with 1.7.3 - why?

Posted by Alexander Veremyev (alexander) on 2009-06-19T04:45:06.000+0000


Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.