dongren5293 2010-09-29 03:57
浏览 76
已采纳

如何使用MySQL重新索引Sphinx

I'm trying to figure out how I should be reindexing Sphinx. I'm using v 0.9.9, so I don't have the ability to do real-time updates of the index.

I think I read somewhere that this can be done using a cron job, and that the index does not need to be entirely rebuilt (so no stopping the daemon). That said, I've never written nor run any cron jobs, so no idea where to even start.

Any thoughts?

  • 写回答

1条回答 默认 最新

  • dsm42026 2010-10-11 07:59
    关注

    I think what you're after is a main+delta index. The main index you build say once a day then every 5 minutes (or whatever period you need) you'd update it with changes since the last time it built. There is something in the docs that explains this and there are also posts on Google about this as well.

    http://sphinxsearch.com/docs/current.html#delta-updates

    In terms of the cronjob to rebuild your delta every 5 minutes you'd want something like:

    */5 * * * * /opt/sphinx/bin/indexer -c /opt/sphinx/etc/sphinx.conf --rotate delta_idx
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮