I'm trying to get Thinking Sphinx running on my site but I'm not sure how to set up the search box and button for the index page. I have in my model:
define_index do
indexes :name
indexes description
where "approved = 'true'"
end
In my controller:
def index
@businesses = Business.search params[:search]
end
And in my index.html.erb I installed the autocomplete plugin and have:
<h3>Search Business</h3><%= text_field_with_auto_complete :name %>
I just don't know how to link up my text box with Sphinx. Do I need to create a button? Thanks for any help.