title: How can I search across multiple tables(models) with Sunspot Solr?
body: <p>I want users to be able to use one search box to search for different objects. I would differentiate them on the results page. Both would be full text search.</p>
  
  <p>Should I make a Search controller and load everything into the index action with something like:</p>
  
  <pre><code>@posts = Post.all
  @groups = Group.all
  </code></pre>
  
  <p>Something tells me that would be fantastically inefficient.</p>
  
  <p>I'm not really sure where to start, I haven't managed to find anything addressing this question on the interwebs, but if I have overlooked something let me know.</p>
  
  <p>Thanks</p>
  
  <p>EDIT:
  here's my search bar that is available globally on my website:</p>
  
  <pre><code>    -form_tag posts_path, :method =&gt; :get do
       =text_field_tag :search, params[:search], :id =&gt; 'searchfield'
       =submit_tag '',:name =&gt; nil, :id =&gt; 'searchbutton'
  </code></pre>
  
  <p>it only searches the "Post" model right now, and displays the results on the Post#index view</p>
  
  <p>I want to be able to have queries typed into the search box be searched for in both the Post and Group tables, and the results be displayed in two separate columns on the same page. maybe through a search controller/view</p>