title: Independent Indexes in Elastic Search
body: <p><em><strong>UPDATE:</strong> Redefined what I am trying to do.</em></p>
  
  <p>I have a model of Contact, this contact belongs to an account as does every other model in my account. I need all searches whether they be global or model specific to only query the containing account. I was told that I could do this with custom index names. I would like the index name to be the 'index-#{account-id}'. How would I achieve this in my active-models?</p>
  
  <pre><code>class Contact &lt; ActiveRecord::Base
    include Tire::Model::Search
    include Tire::Model::Callbacks
  
    belongs_to :account
  
    mapping do
      indexes :first_name
      indexed :last_name
    end    
  
  end
  
  class Account &lt; ActiveRecord::Base
      has_many :contacts
  end
  </code></pre>