title: Group using Sunspot/Solr?
body: <p>I'm having some problem searching by group when using Sunspot.</p>
  
  <p>Here is an example:</p>
  
  <pre><code># == Schema Information
  #
  # Table name: movies
  #
  #  id              :integer(4)      not null, primary key
  #  title           :string(255)
  
  class Movie &lt; ActiveRecord::Base
    has_and_belongs_to_many :actors
  
    searchable do
      text :title
  
      integer :ages, multiple: true do
        actors.map(&amp;:age)
      end
  
      text :names, multiple: true do
        actors.map(&amp;:name)
      end
    end
  end
  
  # == Schema Information
  #
  # Table name: actors
  #
  #  id              :integer(4)      not null, primary key
  #  name            :string(255)
  #  age             :integer(30)
  
  class Actor &lt; ActiveRecord::Base
    has_and_belongs_to_many :movies
  
    searchable do
      integer :age
      text :name
    end
  end
  </code></pre>
  
  <p>I want to find every movie that has an actor named John at age 30.</p>
  
  <pre><code>Movie.search do
    with(:names).equal_to("John")
    with(:ages).equal_to(30)
    with(:title).equal_to("...")
    # ...
  end
  </code></pre>
  
  <p>The problem is here that it may find a movie that has two actors; one named John and one at age 30. Is there a way to somehow group this together so that the movie found have an actor named John at age 30?</p>