# Multiple model search with acts\_as\_solr\_reloaded

**URL:** <https://www.ruby-forum.com/t/multiple-model-search-with-acts-as-solr-reloaded/193422>\
**Category:** Rails\
**Created:** [August 17, 2010, 2:39pm UTC](https://www.ruby-forum.com/t/multiple-model-search-with-acts-as-solr-reloaded/193422 "2010-08-17T14:39:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmanivannancse](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8491ac/32.png) [@jmanivannancse](https://www.ruby-forum.com/u/jmanivannancse)\
**Post date:** [August 17, 2010, 2:39pm UTC](https://www.ruby-forum.com/t/multiple-model-search-with-acts-as-solr-reloaded/193422/1 "2010-08-17T14:39:53Z")

</div>

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
