Hello
I have a search form with 4 text fields: generic text, city, start
date and end date. Generic text uses TS to search on name, registered
name and contact's name and I need a query like this:
Client.search("params[:generic_text]", :conditions => ["city like ?
and created_at > ? and created_at < ?", "%params[:city]%",
params[:start_date], params[:end_date]])
I have seen that I can use :with to search on the range of dates, but
I can't find something similar to "city like ?"
Am I missing something? Any help would be really appreciated
These are my indexes on the Client model
define_index do
indexes :name
indexes registered_name
indexes contacts.name, :as => :contact
has :country
has :created_at
end
pd: sorry for the bad English
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
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.