【问题标题】:Magento Lucene Search Exception - Wrong segments.gen file formatMagento Lucene 搜索异常 - 错误的segments.gen 文件格式
【发布时间】:2016-02-16 13:36:17
【问题描述】:

Magento 安装达到 100% 的磁盘使用率。修复这个问题后,Lucene 搜索现在好像下线了。

我无法重建搜索索引,因为我只是遇到了这个错误:

[ssh]$ php shell/lucene-tool.php --removeall 1                                                                                                                                                                                                                              
Removing all documents from the index...(can be slow)                                                                                                                                                                                                                                                 
PHP Fatal error:  Uncaught exception 'Zend_Search_Lucene_Exception' with message 'Wrong segments.gen file format' in /html/lib/Zend/Search/Lucene.php:266                                                                                                         
Stack trace:                                                                                                                                                                                                                                                                                          
0 /html/lib/Zend/Search/Lucene.php(529): Zend_Search_Lucene::getActualGeneration(Object(Zend_Search_Lucene_Storage_Directory_Filesystem))                                                                                                                        
1 /html/lib/Zend/Search/Lucene.php(211): Zend_Search_Lucene->__construct('/html...', true)                                                                                                                                                             
2 /html/app/code/community/Php4u/BlastLuceneSearch/Model/Blastlucenesearch.php(19) : eval()'d code(1) : eval()'d code(1) : eval()'d code(18): Zend_Search_Lucene::create('/chroot/home/wo...')                                                                   
3 /html/app/code/community/Php4u/BlastLuceneSearch/Model/Blastlucenesearch.php(19) : eval()'d code(1) : eval()'d code(1) : eval()'d code(18): Php4u_BlastLuceneSearch_Model_BlastLuceneSearch->getIndex()                                                        
4 /html/shell/lucene-t in /html/lib/Zend/Search/Lucene.php on line 297    

我已经解决了磁盘溢出问题并在整个服务器上运行了权限修复程序。我不确定下一步该采取哪一步。

【问题讨论】:

    标签: magento zend-search-lucene


    【解决方案1】:

    我最终解决了以下情况:

    1. 删除var/indexer/
    2. 创建var/indexe/替换文件夹
    3. SSH php shell/lucene-tool.php --mark_unprocessed 1
    4. SSH php shell/lucene-tool.php --removeall 1
    5. SSH php shell/indexer.php --reindex rebuild_search_index_lucene

    How to reindex all products from the scratch (SSH method) ? (Full reindex)

    这恢复了搜索索引并且不再弹出错误。

    【讨论】:

    • 我也遇到过类似的问题,我认为删除/var/indexer/ 文件夹的内容就是你真正需要做的。但是,它仍然帮助了我,谢谢!
    猜你喜欢
    • 2011-09-24
    • 1970-01-01
    • 1970-01-01
    • 2014-08-15
    • 2016-03-03
    • 1970-01-01
    • 2011-05-17
    • 2023-03-09
    • 2017-01-01
    相关资源
    最近更新 更多