【问题标题】:thinking-sphinx: indexing ok, querying gets "No response from searchd" error思考狮身人面像:索引正常,查询得到“搜索没有响应”错误
【发布时间】:2012-01-27 18:43:14
【问题描述】:

我在开发环境中遇到此错误,在我的控制器或控制台中使用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 

【问题讨论】:

  • 能否提供“searchd --status”的输出?您是否尝试过至少升级到 2.0.2 版本?
  • search 命令行工具实际上并不与守护进程对话 - 它直接从索引文件本身进行欺骗和读取。
  • Sphinx 0.9.9-release (r2117) 版权所有 (c) 2001-2009,Andrew Aksyonoff 致命:没有可读的配置文件(在 /usr/local/Cellar/sphinx/0.9.9/etc 中查看/sphinx.conf, ./sphinx.conf)。
  • 其实我的配置是有效的,当我尝试配置thinking sphinx时出现了问题。我尝试升级到 2.0.3,但我不确定它是否可以与思考狮身人面像一起使用。我重新安装了原始版本。

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


【解决方案1】:

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

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

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

【讨论】:

  • 这对我有用,但我的索引器路径是 /usr/bin/indexer(通过在我的命令行运行 whereis indexer 发现这一点,“product_core”也应替换为您的索引名称,如果你查看你的 sphinx conf,它应该会告诉你它是什么
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-11-29
  • 2013-07-26
  • 1970-01-01
相关资源
最近更新 更多