I have thinking sphinx setup with my search form, but it is returning all users instead of users with the data I searched.
In the users controller:
@users = params[:query].blank? ? User.all : User.search(params[:query])
user_index.rb (inside /indices):
ThinkingSphinx::Index.define :user, :with => :active_record do
indexes name, :as => :user, :sortable => true
indexes [ethnicity, religion, about_me, sexuality, children, user_smoke, user_drink, age, gender]
has id, created_at, updated_at
I have nothing for thinking sphinx inside my User model, not sure if I need to go that route. Any help would be appreciated
This topic is now closed. New replies are no longer allowed.