Thinking Sphinx not indexing certain models
This is quite strange. I have 3 models (A, B, C). Were working perfectly when crontab runs it.
Recently, I was having problem with indexing new entries for model A.
When I invoke rake ts:index RAILS_ENV=production
manually, indexing runs fine. No error, problem. But, only model B, C get updated. Model A doesn't get updated. I checked all the logs, there wasn't any problem.
Here's 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
Here you will notice a_core
doesn't appear. All these while it was working fine. When I saw it running, it was indexing A
, but when I checked my sphinx db when it was last updated, it was not updated. Permission for all Sphinx db is all the same.
The only way to get the indexing running well is to remove old sphinx db, and invoke an entire ts:rebuild
. I haven't tried removing the production.sphinx.conf
though.
I did try to add delta indexing in the past before this happened. Well, delta indexing couldn't work somehow, but the normal indexing was fine. Then, the indexing broke for model A. I didn't realize it broke anyway. Then I turned off delta indexing without removing the column. (I still didn't know indexing was running fine for model A). Then today I found out there was problem with model A indexing. So I thought maybe I didn't remove the delta column in my database. So I removed the column, restarted MySQL, Apache, and model A index still doesn't get updated.
I actually don't think it has something to do with delta indexing. Because I added, then removed delta indexing for all A, B, C models. If it should break, it should break all instead of just one model.
Please help. Thank you.
EDIT Model 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
Model B
# ThinkingSphinx Index
define_index do
indexes name
indexes duration
has budget, created_at, rating_average
# set_property :delta => true
end
It turned out, my server ran out of disk space. Model A index is very much larger than other models. Even though indexing was successful, it couldn't write to the disk (though there was no error ouput). But as I kept trying to add more and more contents to model A, and kept rebuilding, the disk space problem showed.
So I increased my disk size. Now it's fine.
精彩评论