思考 - 狮身人面像& Rails - 内容不再编入索引

时间:2013-05-20 22:36:20

标签: ruby-on-rails sphinx thinking-sphinx

我有一个Rails应用程序,可以对分类广告进行索引。我正在使用思维 - 狮身人面像。 昨天,我意识到我的广告不再被编入索引。我是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个广告不再被考虑在内......

请问您如何跟踪问题? 是否有任何简单的解决方案可以初始化索引?

1 个答案:

答案 0 :(得分:0)

请找到什么命令“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).

我认为我在这里有几个问题,第一个是我正在使用开发索引文件而不是生产...我必须检查我的部署过程......