Sphinx Thinking Does Not Index Specific Models

This is pretty weird. I have 3 models (A, B, C). Worked fine when crontab launches it.

I recently had a problem indexing new records for Model A.

When I call rake ts:index RAILS_ENV=productionmanually, indexing is fine. No errors, no problems. But only model B, C is updated. Model A is not updated. I checked all the magazines, there were no problems.

Here 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 that it is a_corenot displayed. All this worked fine so far. When I saw that it works, this is indexing A, but when I checked my sphinx db when it was the last, it was not updated. Permission for all Sphinx db anyway.

The only way to succeed in indexing is to remove the old sphinx db and call the integer ts:rebuild. I did not try to remove production.sphinx.conf, though.

I tried adding delta indexing in the past before this happened. Well, delta indexing couldn't work, but normal indexing was great. Then the indexing was broken for model A. I still did not understand that it was broken. Then I disabled delta indexing without deleting the column. (I still did not know that indexing works fine for model A). Then today I discovered that there was a problem with indexing model A. So I thought that maybe I did not delete the delta column in my database. So I deleted the column, restarted MySQL, Apache and the model. The index is still not updating.

, -. , - 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
+3
1

, . A , . , , ( ). A , .

, . .

0

Source: https://habr.com/ru/post/1777394/


All Articles