Good point - but also, the :extended match mode also includes boolean logic - and it is turned on automatically when you use :conditions (as the extended match mode is needed to match on specific fields).
-- Pat On 27/05/2010, at 4:43 PM, Al-Faisal El-Dajani wrote: > You should set :match_mode => :boolean to be able to use boolean > operators in your search query. Check the documentation here for > further details: > http://freelancing-god.github.com/ts/en/searching.html#matchmodes > > On May 26, 6:01 pm, Hellfires <[email protected]> wrote: >> This is my index definition >> define_index do >> indexes :name, :as >> => :first_name, :sortable => true >> indexes outlet_type_id >> indexes circulation_value >> indexes address.city, :as => :city, :sortable => >> true >> indexes address.state_province, :as => :state_province, :sortable >> => true >> indexes address.country, :as => :country, :sortable => >> true >> indexes subjects.name, :as => :subject_field >> end >> >> Model.search(:conditions =>{:state_province => "NC"}) works fine. >> but what I want to do is to search for NC or "North Carolina" >> I tried using >> Model.search(:conditions =>{:state_province => "(NC|North >> Carolina)"}), but it returns an empty set. >> What am I doing wrong here, is it even possible? >> I'm really stuck and I need this urgently. Pat? > > -- > 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. > -- 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.
