Manivannan Jeganathan
2010-Aug-17 12:39 UTC
multiple model search with acts_as_solr_reloaded
I have used act_as_solr_reloaded plugin for searching option in my project I have two models which are brand and sku and its association are class Brand < ActiveRecord::Base acts_as_solr :include => [:skus],:fields => [:id,:name,:description,:active] end class Sku < ActiveRecord::Base acts_as_solr :include => [:brand],:fields => [:id,:name,:description,:brand_id,:active{:price=>:range_float},{:date => :date}] end I should form conditions from multiple models like brands.active=''true'' and skus.active=''true and brands.id=skus.brand_id and skus.date between ''from date'' and ''to date'' I am really struggle with date range search. please help me how to make search like above using act_as_solr_reloaded -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.