为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

Sphinx找不到索引文件的解决办法

2018-04-24 2页 doc 12KB 17阅读

用户头像

is_589748

暂无简介

举报
Sphinx找不到索引文件的解决办法Sphinx找不到索引文件的解决办法 Sphinx某些时候会找不到搜索结果,使用seach命令进行搜索时发现有如下错误: index 'xxx': search error: failed to open /data/html/index/xxx.sph: No such file or directory 到该目录下发现出现很多名为xxx.new.sph, xxx.new.spa, xxx.new.spm等文件, 而sphinx配置文件中写的索引路径为/data/html/index/xxx。 可以确定是searc...
Sphinx找不到索引文件的解决办法
Sphinx找不到索引文件的解决办法 Sphinx某些时候会找不到搜索结果,使用seach命令进行搜索时发现有如下错误: index 'xxx': search error: failed to open /data/html/index/xxx.sph: No such file or directory 到该目录下发现出现很多名为xxx.new.sph, xxx.new.spa, xxx.new.spm等文件, 而sphinx配置文件中写的索引路径为/data/html/index/xxx。 可以确定是search寻找的是xxx.sph文件,而indexer或searchd将索引文件命名为 xxx.new.sph造成无法检索。 这个问出现的原因和indexer rotate工作方式有关,具体可以参考 。 原因引用如下: It seems that a) the lock files were lost somehow, and b) you ran indexer without --rotate switch. Normally, searchd would create .spl lock files on startup (and kill them on shutdown), and indexer would then refuse to reindex without --rotate switch. indexers sends SIGHUP to searchd when completed (and it should print that out). searchd then does the following: 1) waits for all children to exit 2) renames current index files to .old 3) renames .new index files to current 4) tries to load current index files 5) if something failed, it rollbacks current files from .old and new to .new In your case I would start with double checking directory access rights, users which both indexer and searchd run under, etc. 解决方式为: searchd --stop # 先停掉searchd,注意如果采用kill的方式,要保证/var/log/searchd.pid 文件的一致性 index --all # 重建所有索引,可以看到xxx.sph文件又回来了 searchd # 启动searchd服务 index --all --rotate # 试试用rotate命令重建索引
/
本文档为【Sphinx找不到索引文件的解决办法】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索