{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch-rails/issues/173","labels_url":"https://api.github.com/repos/elastic/elasticsearch-rails/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch-rails/issues/173/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch-rails/issues/173/events","html_url":"https://github.com/elastic/elasticsearch-rails/issues/173","id":38146995,"number":173,"title":"Model's settings and mappings are ignored when the index is created through Model.import","user":{"login":"dimroc","id":635121,"avatar_url":"https://avatars.githubusercontent.com/u/635121?v=3","gravatar_id":"","url":"https://api.github.com/users/dimroc","html_url":"https://github.com/dimroc","followers_url":"https://api.github.com/users/dimroc/followers","following_url":"https://api.github.com/users/dimroc/following{/other_user}","gists_url":"https://api.github.com/users/dimroc/gists{/gist_id}","starred_url":"https://api.github.com/users/dimroc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimroc/subscriptions","organizations_url":"https://api.github.com/users/dimroc/orgs","repos_url":"https://api.github.com/users/dimroc/repos","events_url":"https://api.github.com/users/dimroc/events{/privacy}","received_events_url":"https://api.github.com/users/dimroc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2014-07-18T04:14:48Z","updated_at":"2015-10-12T12:31:08Z","closed_at":null,"body":"Hi all,\r\nI'm trying to use mappings defined in an AR model backed by postgres (rails 4.0.4) to create an index and its corresponding mappings. My model has the following:\r\n\r\n```ruby\r\n    mappings dynamic: false do\r\n      indexes :text\r\n      indexes :neighborhood, index: 'not_analyzed'\r\n    end\r\n```\r\n\r\nUnfortunately, when I run `curl -XGET 'http://localhost:9200/my_index/_mapping?pretty=true'`\r\n\r\n```json\r\n{\r\n  \"my_index\" : {\r\n    \"mappings\" : {\r\n      \"my_type\" : {\r\n        \"properties\" : {\r\n          \"index\" : {\r\n            \"properties\" : {\r\n              \"_id\" : {\r\n                \"type\" : \"long\"\r\n              },\r\n              \"_score\" : {\r\n                \"type\" : \"long\"\r\n              },\r\n              \"neighborhood\" : {\r\n                \"type\" : \"string\"\r\n              },\r\n              \"text\" : {\r\n                \"type\" : \"string\"\r\n              }\r\n            }\r\n          }\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nNotice the lack of `\"index\": \"not_analyzed\"`. Using the curl commands against ES directly, I was able to create the index needed.\r\n\r\nThis is all invoked using `ModelName.import`."},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch-rails/issues/comments/147382817","html_url":"https://github.com/elastic/elasticsearch-rails/issues/173#issuecomment-147382817","issue_url":"https://api.github.com/repos/elastic/elasticsearch-rails/issues/173","id":147382817,"user":{"login":"dimroc","id":635121,"avatar_url":"https://avatars.githubusercontent.com/u/635121?v=3","gravatar_id":"","url":"https://api.github.com/users/dimroc","html_url":"https://github.com/dimroc","followers_url":"https://api.github.com/users/dimroc/followers","following_url":"https://api.github.com/users/dimroc/following{/other_user}","gists_url":"https://api.github.com/users/dimroc/gists{/gist_id}","starred_url":"https://api.github.com/users/dimroc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimroc/subscriptions","organizations_url":"https://api.github.com/users/dimroc/orgs","repos_url":"https://api.github.com/users/dimroc/repos","events_url":"https://api.github.com/users/dimroc/events{/privacy}","received_events_url":"https://api.github.com/users/dimroc/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T12:31:08Z","updated_at":"2015-10-12T12:31:08Z","body":"Great news! :beers: "}}