这很奇怪。我有三种型号(A、B、C)。当crontab运行它时工作得很好。
最近,我对索引A的新条目有问题。
当我召唤
rake ts:index RAILS_ENV=production
手动,索引运行良好。没有错误,有问题。但是,只有B型和C型得到更新。型号A没有更新。我检查了所有的日志,没有任何问题。
这是
searchd.log
:
[Mon Nov 29 15:02:27.920 2010] [ 7280] rotating indices (seamless=1)
[Mon Nov 29 15:02:28.211 2010] [ 7280] rotating index 'b_core': success
[Mon Nov 29 15:02:28.215 2010] [ 7280] rotating index 'c_core': success
[Mon Nov 29 15:02:28.216 2010] [ 7280] rotating finished
你会注意到
a_core
不会出现。一切都在顺利进行。当我看到它运行时,它是索引的。
A
,但当我上次更新sphinx数据库时,它没有更新。所有Sphinx db的权限都是相同的。
实现索引运行的唯一方法是删除旧的狮身人面像DB,调用整个DB。
ts:rebuild
. 我还没试过把
production.sphinx.conf
不过。
在过去发生之前,我确实尝试添加增量索引。嗯,delta索引不能起作用,但是正常的索引是很好的。然后,A.模型的索引中断了,我没有意识到它坏了。然后在不删除列的情况下关闭delta索引。(我仍然不知道索引A对于模型A运行良好)。然后今天我发现模型A的索引存在问题。所以我想也许我没有删除数据库中的delta列。所以我删除了该列,重新启动了MySQL、Apache和model A索引,但仍然没有得到更新。
实际上,我不认为它与delta索引有关。因为我添加了,然后删除了所有A、B、C模型的增量索引。如果它应该中断,它应该中断所有而不是只有一个模型。
请帮忙。谢谢您。
编辑
模型A
# ThinkingSphinx Index
define_index do
indexes :name, :sortable => true
indexes address
indexes city
indexes state
indexes country
indexes spot_type
indexes season
indexes description
has rating_average
# set_property :delta => true
end
B型
# ThinkingSphinx Index
define_index do
indexes name
indexes duration
has budget, created_at, rating_average
# set_property :delta => true
end