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:
def index @users = params[:query].blank? ? User.all : User.search(params[:query])
user_index.rb (inside /indices):
ThinkingSphinx::Index.define :user, :with => :active_record do # fields indexes name, :as => :user, :sortable => true indexes [ethnicity, religion, about_me, sexuality, children, user_smoke, user_drink, age, gender] # attributes has id, created_at, updated_at end
I have nothing for thinking sphinx inside my User model, not sure if I need to go that route. Any help would be appreciated