Jérémie
Jérémie

Reputation: 305

thinking-sphinx: indexing ok, querying gets "No response from searchd" error

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 

Upvotes: 2

Views: 1339

Answers (1)

dabobert
dabobert

Reputation: 929

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

Upvotes: 1

Related Questions