Thinking-sphinx:索引正常,查询得到“Searchd 没有响应”错误

发布于 2024-12-29 07:00:52 字数 1662 浏览 1 评论 0原文

我在开发环境中遇到此错误,在我的控制器中使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

酷到爆炸 2025-01-05 07:00:52

我遇到了同样的问题,但由于某种原因,执行以下操作有效,

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

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

i had the same issue, but for some reason doing the following worked

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文