xeoshow
2008-01-18 06:49:39 UTC
Hello, all
I have an java lucene index, now want to migrate to php
Zend_Search_Lucene, but encountered the following error:
---------------
*Fatal error*: Uncaught exception 'Zend_Search_Lucene_Exception' with
message 'Wrong segments file format' in
E:\Others\APM-Express\htdocs\site\Zend\Search\Lucene.php:240 Stack trace: #0
E:\Others\APM-Express\htdocs\site\Zend\Search\Lucene.php(182):
Zend_Search_Lucene->__construct('tmp/index', false) #1
E:\Others\APM-Express\htdocs\site\search-index.php(10):
Zend_Search_Lucene::open('tmp/index') #2 {main} thrown in *
E:\Others\APM-Express\htdocs\site\Zend\Search\Lucene.php* on line *240*
---------------
I checked line 240 of Lucene.php as below (bold line):
---------------
if ($format != (int)0xFFFFFFF) {
throw new Zend_Search_Lucene_Exception('Wrong segments file
format');
}
---------------
And then, I checked the segments file, as below, not exactly starts with
"FFFFFFF". (Attachment is a snapshot for it)
-----------------------------------
FFFFFFFD000001.....
-----------------------------------
How should I handle such situation? The java lucene index can work fine
under java env, could you please help me with this migration?
If you need any other info, pls tell me. Thanks a lot.
I have an java lucene index, now want to migrate to php
Zend_Search_Lucene, but encountered the following error:
---------------
*Fatal error*: Uncaught exception 'Zend_Search_Lucene_Exception' with
message 'Wrong segments file format' in
E:\Others\APM-Express\htdocs\site\Zend\Search\Lucene.php:240 Stack trace: #0
E:\Others\APM-Express\htdocs\site\Zend\Search\Lucene.php(182):
Zend_Search_Lucene->__construct('tmp/index', false) #1
E:\Others\APM-Express\htdocs\site\search-index.php(10):
Zend_Search_Lucene::open('tmp/index') #2 {main} thrown in *
E:\Others\APM-Express\htdocs\site\Zend\Search\Lucene.php* on line *240*
---------------
I checked line 240 of Lucene.php as below (bold line):
---------------
if ($format != (int)0xFFFFFFF) {
throw new Zend_Search_Lucene_Exception('Wrong segments file
format');
}
---------------
And then, I checked the segments file, as below, not exactly starts with
"FFFFFFF". (Attachment is a snapshot for it)
-----------------------------------
FFFFFFFD000001.....
-----------------------------------
How should I handle such situation? The java lucene index can work fine
under java env, could you please help me with this migration?
If you need any other info, pls tell me. Thanks a lot.