title: Rails __elasticsearch__.create_index! "Root mapping definition has unsupported parameters(mapper_parsing_exception)"
body: <p>I have trouble with <em>elasticsearch-rails</em>, when I'm using <code>Business.__elasticsearch__.create_index!</code> I'm getting an error: </p>
  
  <blockquote>
    <p>{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters:  [business : {dynamic=true, properties={id={type=integer}}}]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters:  [business : {dynamic=true, properties={id={type=integer}}}]","caused_by":{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters:  [business : {dynamic=true, properties={id={type=integer}}}]"}},"status":400}</p>
  </blockquote>
  
  <p>Behind that request is: </p>
  
  <blockquote>
    <p>PUT <a href="http://localhost:9200/development_businesses" rel="nofollow noreferrer">http://localhost:9200/development_businesses</a> [status:400, request:0.081s, query:N/A]
    {"settings":{"index":{"number_of_shards":1}},"mappings":{"business":{"dynamic":"true","properties":{"id":{"type":"integer"}}}}}</p>
  </blockquote>
  
  <p>My Model code:</p>
  
  <pre><code>`
  after_save :reindex_model
  Elasticsearch::Model.client = Elasticsearch::Client.new url: ENV['BONSAI_URL'], log: true
  include Elasticsearch::Model
  include Elasticsearch::Model::Callbacks
  index_name [Rails.env, model_name.collection.gsub('///', '-')].join('_')
  document_type self.name.downcase
  `
  </code></pre>
  
  <p>I have defined my mapping:</p>
  
  <pre><code>`
  settings index: { number_of_shards: 1 } do
      mappings dynamic: 'true' do
          indexes :id, type: 'integer'
      end
  end
  `
  </code></pre>