2012-01-27 128 views
2

“从searchd的无响应”我在发展ENV这个错误,在我的控制器或控制台思维 - 狮身人面像:索引行,查询得到错误

> Product.search "moule" 
Riddle::ResponseError: No response from searchd (status: , version:) 

的服务已启动(使用思维 - 狮身人面像搜索rake ts:start)和运行(ps aux | grep用我的开发配置文件显示searchd进程)。

搜索似乎使用搜索命令行工作:

search --config /Users/yyy/workspace/xxx/config/development.sphinx.conf moule    

让我所有的配套产品

index 'product_core': query 'moule ': returned 17 matches of 17 total in 0.000 sec 

我试图重新启动我的Rails应用程序或searchd的,也重新索引,我可以”让它工作!

这里是我的配置:

development: 
    morphology: libstemmer_french 
    enable_star: true 
    html_strip: true 
    min_prefix_len: 4 
    min_infix_len: 0 
    charset_type: utf-8 

我使用

rails (2.3.8) 
thinking-sphinx (1.3.20)/riddle 1.2.2 
sphinx 0.9.9 

(编辑) 它看起来像这个问题可能来自我定义的索引指令。我恢复了我所做的一些改变,重建了索引,错误不再出现。这个问题没有解决,因为

> Product.search "moule" 

不会返回任何结果(应该有)。 前几天,一切工作正常:-S

(编辑)这里是searchd的--status结果:

searchd status 
-------------- 
uptime: 85351 
connections: 1 
maxed_out: 0 
command_search: 0 
command_excerpt: 0 
command_update: 0 
command_keywords: 0 
command_persist: 0 
command_status: 1 
agent_connect: 0 
agent_retry: 0 
queries: 0 
dist_queries: 0 
query_wall: 0.000 
query_cpu: OFF 
dist_wall: 0.000 
dist_local: 0.000 
dist_wait: 0.000 
query_reads: OFF 
query_readkb: OFF 
query_readtime: OFF 
avg_query_wall: 0.000 
avg_query_cpu: OFF 
avg_dist_wall: 0.000 
avg_dist_local: 0.000 
avg_dist_wait: 0.000 
avg_query_reads: OFF 
avg_query_readkb: OFF 
avg_query_readtime: OFF 
+0

“search”命令行工具实际上并不会与守护进程对话 - 它会直接从索引文件本身进行欺骗和读取。 – pat 2012-01-29 07:34:36

+0

您能否为“searchd --status”提供输出?你有没有试过升级至少2.0.2版本? – 2012-01-28 05:55:47

+0

Sphinx 0.9.9-release(r2117) Copyright(c)2001-2009,Andrew Aksyonoff 致命错误:没有可读的配置文件(查看/usr/local/Cellar/sphinx/0.9.9/etc/sphinx.conf ,./sphinx.conf)。 – 2012-01-29 08:48:04

回答

1

我有同样的问题,但由于某种原因做了以下工作

/usr/local/bin/indexer --rotate product_core --config config/development.sphinx.conf 

您当然必须编辑sphinx配置的路径和索引器的路径。我实际上不知道发生了什么事,但它修复了它,但它修复了一样

+0

这对我有效,但我的索引器路径是/ usr/bin/indexer(通过在我的命令行运行'whereis indexer'也可以找到'product_core'应该替换为索引的名称,如果你看看你的内部狮身人面像conf它应该告诉你它是什么 – concept47 2014-05-17 07:00:37