狮身人面像指数器delta - 旋转

时间:2011-09-29 20:06:07

标签: linux sphinx

我在此处遵循了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).

一切看起来都有效,主要索引应该已经更新。然后我去了我的搜索栏,但它没有更新,因为我无法搜索新项目。

有什么建议吗?

2 个答案:

答案 0 :(得分:1)

确保使用应用中的两个(主要和delta)索引进行搜索。 Delta索引只是另一个索引,因此基本上在重新索引delta索引时,它不会向主索引添加任何内容。所以你的应用应该搜索两个索引(主要,delta)。

答案 1 :(得分:-1)

我的建议很简单。 编写一个简单的程序来经常索引它,然后重新启动sphinx服务(searchd)。 结果会出来。

确保在api代码中包含main和index。 ($ index =“main,delta”;)

您可以按照我在上一个答案中的说明操作:Does Sphinx auto update is index when you add data to your SQL?

相关问题