hi there,
  I am in the midst of moving an existing app built in rails 2.3.8 to rails 
3.

My searching functionality with thinking sphinx does not work anymore.

 When I search with params[:search] by itself, it works as in, I get my 
results but when I pass the flags for page and sorting in, it results no 
results.

 To illustrate,

a) this works

        @search =   Part.search( params[:search])


Started POST "/search" for 130.194.80.159 at 2012-06-03 19:54:08 -0700
Processing by SearchController#perform_search as HTML
  Parameters: {"utf8"=>"â", "fit"=>{"make_id"=>"", "vehicle_id"=>""}, 
"search"=>{"category_id"=>"1", "sub_category_id"=>""}, "commit"=>"Search"}
  Sphinx Query (3.0ms)  {"category_id"=>"1", "sub_category_id"=>"", 
"fits_make_id_equals"=>"", "fits_vehicle_id_equals"=>""}
  Sphinx  Found 0 results
  Rendered search/results.html.erb within layouts/application (0.7ms)
Completed 200 OK in 83ms (Views: 7.5ms | ActiveRecord: 2.3ms | Sphinx: 
3.0ms)


b) this does not work

        @search =   Part.search( params[:search] , :page => param[:page]  , 
 'sort_by' => 'updated_at' , 'sort_mode' => 'desc' )



Started POST "/search" for ...   at 2012-06-03 19:54:08 -0700
Processing by SearchController#perform_search as HTML
  Parameters: {"utf8"=>"â", "fit"=>{"make_id"=>"", "vehicle_id"=>""}, 
"search"=>{"category_id"=>"1", "sub_category_id"=>""}, "commit"=>"Search"}
  Sphinx Query (3.0ms)  {"category_id"=>"1", "sub_category_id"=>"", 
"fits_make_id_equals"=>"", "fits_vehicle_id_equals"=>""}
  Sphinx  Found 0 results
  Rendered search/results.html.erb within layouts/application (0.7ms)
Completed 200 OK in 83ms (Views: 7.5ms | ActiveRecord: 2.3ms | Sphinx: 
3.0ms)

This is very puzzling and any help will be appreciated.

Thank you, all :)

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/thinking-sphinx/-/PIBJoX67RU8J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to