国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
sphinx的主索引+增量索引與分布式搜索

今天在網(wǎng)上找為數(shù)不多的資料,居然找到了一個(gè)比官方手冊機(jī)制策略還好的實(shí)例,是關(guān)于主索引+增量索引,合并索引的文章。趕緊將重點(diǎn)copy過來:
1、sphinx.conf

2、執(zhí)行

./bin/indexer --config /data/opt/sphinx/etc/sphinx.conf dzbbs./bin/indexer --config /data/opt/sphinx/etc/sphinx.conf threads./bin/searchd --config etc/sphinx.conf

3、加入crontab計(jì)劃任務(wù):

# Incremental Index posts data* 0-3 * * * /data/opt/sphinx/bin/indexer --config /data/opt/sphinx/etc/sphinx.conf dzbbs_delta --rotate* 6-23 * * * /data/opt/sphinx/bin/indexer --config /data/opt/sphinx/etc/sphinx.conf dzbbs_delta --rotate0 4 * * * /data/opt/sphinx/bin/indexer --config /data/opt/sphinx/etc/sphinx.conf dzbbs_merge --rotate && /data/opt/sphinx/bin/indexer --config /data/opt/sphinx/etc/sphinx.conf --merge dzbbs dzbbs_merge --rotate # Incremental Index threads data* 0-3 * * * /data/opt/sphinx/bin/indexer --config /data/opt/sphinx/etc/sphinx.conf threads_delta --rotate* 6-23 * * * /data/opt/sphinx/bin/indexer --config /data/opt/sphinx/etc/sphinx.conf threads_delta --rotate0 4 * * * /data/opt/sphinx/bin/indexer --config /data/opt/sphinx/etc/sphinx.conf threads_merge --rotate && /data/opt/sphinx/bin/indexer --config /data/opt/sphinx/etc/sphinx.conf --merge threads threads_merge --rotate

注:

1、xx_delta每分鐘進(jìn)行增量數(shù)據(jù)更新是為了能夠及時(shí)查找到新的帖子和回復(fù),但并不會更新sph_counter表的記錄。此處不進(jìn)行記錄更新和merge是因?yàn)楫?dāng)數(shù)據(jù)量大以及論壇發(fā)帖頻繁的時(shí)候一分鐘之內(nèi)有可能合并不完,間隔時(shí)間長的話又不能及時(shí)查找到。

2、dzbbs_merge、 threads_merge 是為了將第一次執(zhí)行的主數(shù)據(jù)與之后的新的數(shù)據(jù)進(jìn)行合并,如果長時(shí)間不合并,那么每次執(zhí)行xx_delta的時(shí)間就會很長,一分鐘之內(nèi)執(zhí)行不完。

原帖是用來解決dz搜索問題的:
http://code.google.com/p/dzwithsphinx/

分布式搜索:

index dist
{
type = distributed
local = chunk1
agent = localhost:3312:chunk2
agent = localhost:3312:chunk3
agent = localhost:3312:chunk4
}

本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
coreseek搭建教程
sphinx 更新索引不成功解決方法
Sphinx中文分詞詳細(xì)安裝配置及API調(diào)用實(shí)戰(zhàn)手冊
最新分享
配置 Git
編譯安裝MongoDB
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服