Ruby on rails 斯芬克斯的思考;Rails-内容不再编入索引

Ruby on rails 斯芬克斯的思考;Rails-内容不再编入索引,ruby-on-rails,sphinx,thinking-sphinx,Ruby On Rails,Sphinx,Thinking Sphinx,我有一个Rails应用程序,可以索引Classifieds广告。我正在使用thinking sphinx。 昨天,我意识到我的广告不再被编入索引了。我是Rails的初学者,所以我不知道这里到底发生了什么 我们可以在searchd.query.log文件中看到这个问题: [Sun May 19 22:19:46.432 2013] 0.000 sec [all/5/ext 0 (0,1000000000)] [ad_core] [Sun May 19 22:19:46.446 2013] 0.0

我有一个Rails应用程序,可以索引Classifieds广告。我正在使用thinking sphinx。 昨天,我意识到我的广告不再被编入索引了。我是Rails的初学者,所以我不知道这里到底发生了什么

我们可以在searchd.query.log文件中看到这个问题:

[Sun May 19 22:19:46.432 2013] 0.000 sec [all/5/ext 0 (0,1000000000)] [ad_core]

[Sun May 19 22:19:46.446 2013] 0.000 sec [all/5/ext 0 (0,1000000000)] [ad_core]

[Sun May 19 22:19:46.455 2013] 0.000 sec [all/4/ext **21** (0,1000000000)] [ad_core]

[Sun May 19 22:19:46.590 2013] 0.000 sec [all/5/ext 0 (0,25)] [ad_core]

[Mon May 20 01:21:50.385 2013] 0.000 sec [all/5/ext 0 (0,1000000000)] [ad_core]

[Mon May 20 01:21:50.400 2013] 0.000 sec [all/5/ext 0 (0,1000000000)] [ad_core]

[Mon May 20 01:21:50.409 2013] 0.000 sec [all/4/ext **21** (0,1000000000)] [ad_core]

[Mon May 20 01:21:50.633 2013] 0.000 sec [all/5/ext 0 (0,25)] [ad_core]

[Mon May 20 02:13:12.492 2013] 0.000 sec [all/5/ext 0 (0,1000000000)] [ad_core]

[Mon May 20 02:13:12.508 2013] 0.000 sec [all/5/ext 0 (0,1000000000)] [ad_core]

[Mon May 20 02:13:12.521 2013] 0.000 sec [all/4/ext 0 (0,1000000000)] [ad_core]

[Mon May 20 02:13:12.780 2013] 0.000 sec [all/5/ext 0 (0,25)] [ad_core]

[Mon May 20 02:13:21.341 2013] 0.000 sec [all/5/ext 0 (0,1000000000)] [ad_core]

[Mon May 20 02:13:21.453 2013] 0.000 sec [all/5/ext 0 (0,25)] [ad_core]

[Mon May 20 02:13:36.183 2013] 0.000 sec [all/5/ext 0 (0,1000000000)] [ad_core]

[Mon May 20 02:13:36.197 2013] 0.000 sec [all/5/ext 0 (0,1000000000)] [ad_core]

[Mon May 20 02:13:36.206 2013] 0.000 sec [all/4/ext 0 (0,1000000000)] [ad_core]
凌晨2点后,21条广告不再被考虑

你能就如何追踪这个问题提出建议吗?
是否有任何简单的解决方案可以初始化索引?

请查找“rake ts:index”命令返回的内容:

Generating Configuration to /home/kar/www/myapp/releases/20130520063222/config/development.sphinx.conf
Sphinx 2.0.4-release (r3135)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/home/kar/www/myapp/releases/20130520063222/config/**development**.sphinx.conf'...
indexing index 'ad_core'...
WARNING: collect_hits: mem_limit=0 kb too low, increasing to 17152 kb
collected 0 docs, 0.0 MB
total 0 docs, 0 bytes
total 0.012 sec, 0 bytes/sec, 0.00 docs/sec
skipping non-plain index 'ad'...
total 1 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 5 writes, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg
rotating indices: succesfully sent SIGHUP to searchd (pid=13500).

我想我这里有几个问题,第一个问题是我使用开发索引文件而不是生产。。。我必须回顾我的部署过程…

你能分享你的广告模型的索引定义吗?您是否再次尝试索引数据?如果是,ts:index任务的输出是什么?您是否在RAILS_ENV设置为production的情况下运行每个rake任务?