zoukankan      html  css  js  c++  java
  • 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工作方式有关,具体可以参考http://www.sphinxsearch.com/forum/view.html?id=274。

    原因引用如下:

    解决方式为:

    searchd --stop # 先停掉searchd,注意如果采用kill的方式,要保证/var/log/searchd.pid文件的一致性

    index --all # 重建所有索引,可以看到xxx.sph文件又回来了

    searchd # 启动searchd服务

    index --all --rotate # 试试用rotate命令重建索引

  • 相关阅读:
    归一化与标准化的概念与区别
    深度学习中的优化器学习
    yolo3与yolo-tiny
    给tensorflow1.x estimator 添加timeline分析性能
    python 爬取百度图片
    TensorFlow 高性能数据输入管道设计指南
    TensorRT加速tensorflow模型(使用Tensorflow内置tensorRT,避免写自定义Plugin)
    21.Pod的limit和request和资源监控收集服务Heapster
    20.调度器,预选策略和优选策略
    8.docker的安全性
  • 原文地址:https://www.cnblogs.com/javawebsoa/p/2458338.html
Copyright © 2011-2022 走看看