Sphinx 索引器 delta --旋转
我在这里遵循了 sphinx 手册: http://sphinxsearch.com/docs/current.html #delta-updates 了解如何对索引执行增量更新。
我的 searchd 正在运行正确的配置文件。 之前运行索引器来创建主索引。
当我运行此命令时:
indexer -c /home/brandon/workspace/gallery/server/lib/sphinx/sphinx.conf --rotate delta
我得到以下结果:
using config file '/home/brandon/workspace/gallery/server/lib/sphinx/sphinx.conf'...
read 0.1 of 0.1 MB, 100.0% done
merged 10.8 Kwords
merged in 0.010 sec
total 389 reads, 0.000 sec, 2.0 kb/call avg, 0.0 msec/call avg
total 7 writes, 0.000 sec, 78.6 kb/call avg, 0.0 msec/call avg
rotating indices: succesfully sent SIGHUP to searchd (pid=28039).
一切看起来都正常,并且主索引应该已更新。然后我转到搜索栏,但它尚未更新,因为我无法搜索新项目。
有什么建议吗?
I have followed the sphinx manual here: http://sphinxsearch.com/docs/current.html#delta-updates on how to perform delta updates to your index.
my searchd is running of the correct config file.
the indexer was previously ran to create the main index.
when I run this command:
indexer -c /home/brandon/workspace/gallery/server/lib/sphinx/sphinx.conf --rotate delta
I get this result:
using config file '/home/brandon/workspace/gallery/server/lib/sphinx/sphinx.conf'...
read 0.1 of 0.1 MB, 100.0% done
merged 10.8 Kwords
merged in 0.010 sec
total 389 reads, 0.000 sec, 2.0 kb/call avg, 0.0 msec/call avg
total 7 writes, 0.000 sec, 78.6 kb/call avg, 0.0 msec/call avg
rotating indices: succesfully sent SIGHUP to searchd (pid=28039).
Everything looks as though it worked, and the main index should have been updated. I then go to my search bar, but it has not been updated as I can't search for the new item.
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
确保您在应用中使用两个索引(主索引和增量索引)进行搜索。
Delta 索引只是另一个索引,所以基本上当您重新索引 Delta 索引时,它不会向主索引添加任何内容。因此,您的应用程序应该在两个索引(主索引、增量索引)中进行搜索。
Make sure you search using both (main and delta) indexes in your app.
Delta index is just another index, so basically when you reindex delta index, it adds nothing to the main index. So your app should search in both indexes (main, delta).
我的建议很简单。
编写一个简单的程序来频繁索引它,然后重新启动 sphinx 服务( searchd )。
结果就出来了。
确保在 api 代码中包含 main 和 index。 ( $index = "main,delta"; )
您可以按照我在之前的答案中的说明进行操作:当你向 SQL 添加数据时,Sphinx 自动更新索引吗?
My suggestion is simple.
Write a simple program to index it frequently and after that restart sphinx service ( searchd ).
The results would come out.
Make sure you include both main and index in the api code. ( $index = "main,delta"; )
you may follow my instruction in the previous answer here: Does Sphinx auto update is index when you add data to your SQL?