{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/12407","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/12407/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/12407/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/12407/events","html_url":"https://github.com/elastic/elasticsearch/issues/12407","id":96701979,"number":12407,"title":"Specifying an analyzer for the _all field breaks mapping updates","user":{"login":"lperry","id":969473,"avatar_url":"https://avatars.githubusercontent.com/u/969473?v=3","gravatar_id":"","url":"https://api.github.com/users/lperry","html_url":"https://github.com/lperry","followers_url":"https://api.github.com/users/lperry/followers","following_url":"https://api.github.com/users/lperry/following{/other_user}","gists_url":"https://api.github.com/users/lperry/gists{/gist_id}","starred_url":"https://api.github.com/users/lperry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lperry/subscriptions","organizations_url":"https://api.github.com/users/lperry/orgs","repos_url":"https://api.github.com/users/lperry/repos","events_url":"https://api.github.com/users/lperry/events{/privacy}","received_events_url":"https://api.github.com/users/lperry/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-23T01:08:29Z","updated_at":"2015-07-27T10:47:07Z","closed_at":"2015-07-23T10:59:40Z","body":"Specifying an analyzer for the _all field breaks mapping updates.\r\n\r\n```\r\ncurl -X DELETE http://localhost:29200/twitter\r\n# {\"acknowledged\":true}\r\n\r\ncurl -X PUT http://localhost:29200/twitter -d '\r\n{\r\n  \"mappings\": {\r\n    \"tweet\": {\r\n      \"_all\": {\r\n        \"analyzer\": \"snowball\"\r\n      },\r\n      \"properties\": {\r\n        \"tweet\": {\r\n          \"type\": \"string\",\r\n          \"analyzer\": \"english\"\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n# {\"acknowledged\":true}\r\n\r\ncurl -X PUT http://localhost:29200/twitter/_mapping/tweet -d '\r\n{\r\n  \"properties\": {\r\n    \"tag\": {\r\n      \"type\": \"string\",\r\n      \"index\": \"not_analyzed\"\r\n    }\r\n  }\r\n}\r\n'\r\n# {\"error\":\"MergeMappingException[Merge failed with failures {[mapper [_all] has different index_analyzer]}]\",\"status\":400}\r\n```\r\n\r\nIf no analyzer is specified for the _all field when creating the index, the mapping update call succeeds.\r\n\r\nI've tested the above against Elasticsearch 1.7.0.\r\n\r\nThanks!\r\n\r\nPerry"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/125163227","html_url":"https://github.com/elastic/elasticsearch/issues/12407#issuecomment-125163227","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/12407","id":125163227,"user":{"login":"clintongormley","id":56599,"avatar_url":"https://avatars.githubusercontent.com/u/56599?v=3","gravatar_id":"","url":"https://api.github.com/users/clintongormley","html_url":"https://github.com/clintongormley","followers_url":"https://api.github.com/users/clintongormley/followers","following_url":"https://api.github.com/users/clintongormley/following{/other_user}","gists_url":"https://api.github.com/users/clintongormley/gists{/gist_id}","starred_url":"https://api.github.com/users/clintongormley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clintongormley/subscriptions","organizations_url":"https://api.github.com/users/clintongormley/orgs","repos_url":"https://api.github.com/users/clintongormley/repos","events_url":"https://api.github.com/users/clintongormley/events{/privacy}","received_events_url":"https://api.github.com/users/clintongormley/received_events","type":"User","site_admin":false},"created_at":"2015-07-27T10:47:07Z","updated_at":"2015-07-27T10:47:07Z","body":"Apologies @lperry - I misread the issue.  You are correct.  This has already been fixed in 2.0.\r\n\r\nFor now you can work around it by respecifying the `_all` mapping:\r\n\r\n    PUT /twitter/_mapping/tweet\r\n    {\r\n      \"_all\": {\r\n        \"analyzer\": \"snowball\"\r\n      },\r\n      \"properties\": {\r\n        \"tag\": {\r\n          \"type\": \"string\",\r\n          \"index\": \"not_analyzed\"\r\n        }\r\n      }\r\n    }"}}