Thinking-sphinx:索引正常,查询得到“Searchd 没有响应”错误
我在开发环境中遇到此错误,在我的控制器中使用thinking-sphinx搜索或使用控制台
> 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
I have this error in development env, using thinking-sphinx search in my controller or with console
> Product.search "moule"
Riddle::ResponseError: No response from searchd (status: , version: )
The service is up (rake ts:start), and running (ps aux|grep shows the searchd process with my development config file).
The search seems to work using search command line :
search --config /Users/yyy/workspace/xxx/config/development.sphinx.conf moule
gets me all the matching products
index 'product_core': query 'moule ': returned 17 matches of 17 total in 0.000 sec
I tried to restart my rails application or searchd and also reindex, I can't make it work!
Here is my configuration :
development:
morphology: libstemmer_french
enable_star: true
html_strip: true
min_prefix_len: 4
min_infix_len: 0
charset_type: utf-8
I'm using
rails (2.3.8)
thinking-sphinx (1.3.20) / riddle 1.2.2
sphinx 0.9.9
(edit)
It looks like the problem could come from my define index instruction. I reverted some changed I made, rebuilt the index and the error does not appear any more. The problem isn't fix because
> Product.search "moule"
does not return any result (there should be).
A few days ago, everything was working fine :-S
(edit) here is the searchd --status result :
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了同样的问题,但由于某种原因,执行以下操作有效,
您当然必须编辑 sphinx 配置的路径和索引器的路径。我实际上不知道发生了什么,但它同样修复了它
i had the same issue, but for some reason doing the following worked
You'll of course have to edit the path to the sphinx config and the path to indexer. I actually have no idea what's going on, but it fixed it just the same