{"action":"opened","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/12563","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/12563/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/12563/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/12563/events","html_url":"https://github.com/elastic/elasticsearch/issues/12563","id":98225179,"number":12563,"title":"Should Analyzer setting override search-analyzer for non-analyzed fields ?","user":{"login":"keety","id":2645414,"avatar_url":"https://avatars.githubusercontent.com/u/2645414?v=3","gravatar_id":"","url":"https://api.github.com/users/keety","html_url":"https://github.com/keety","followers_url":"https://api.github.com/users/keety/followers","following_url":"https://api.github.com/users/keety/following{/other_user}","gists_url":"https://api.github.com/users/keety/gists{/gist_id}","starred_url":"https://api.github.com/users/keety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keety/subscriptions","organizations_url":"https://api.github.com/users/keety/orgs","repos_url":"https://api.github.com/users/keety/repos","events_url":"https://api.github.com/users/keety/events{/privacy}","received_events_url":"https://api.github.com/users/keety/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-30T17:49:50Z","updated_at":"2015-07-30T17:49:50Z","closed_at":null,"body":"Analyzer  erroneously specified in mapping for a field of type non-analyzed  overrides the default  keyword search analyzer\r\nAlso the analyze api seems to suggest the index_analyzer is overridden even though it is not so\r\n\r\nExample:\r\n```json\r\n\r\nPUT test\r\n{\r\n    \"settings\": {\r\n        \"analysis\": {\r\n            \"analyzer\": {\r\n                \"my_analyzer\" : {\r\n                    \"tokenizer\" : \"keyword\",\r\n                    \"filter\" : \"lowercase\"\r\n                }\r\n            }\r\n        }\r\n    },\r\n    \"mappings\": {\r\n        \"test\" : {\r\n            \"properties\" : {\r\n                \"data\" : {\"type\" :\"string\" ,\"index\" : \"not_analyzed\",\"analyzer\" : \"my_analyzer\"}\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\nGET  test/_analyze?field=data&text=IT IS ELASTIC\r\n\r\n#Response gives the wrong impression that index-analyzer is overridden\r\n\r\n\r\nPUT test/test/1 \r\n{\r\n    \"data\" : \"it is elastic\"\r\n}\r\n\r\nPOST test/_search\r\n{\r\n    \"query\": {\r\n        \"match\": {\r\n           \"data\": \"IT IS ELASTIC\"\r\n        }\r\n    }\r\n}\r\n#Response indicates *search_analyzer* is overridden \r\n   \"hits\": {\r\n      \"total\": 1,\r\n      \"max_score\": 0.30685282,\r\n      \"hits\": [\r\n         {\r\n            \"_index\": \"test\",\r\n            \"_type\": \"test\",\r\n            \"_id\": \"1\",\r\n            \"_score\": 0.30685282,\r\n            \"_source\": {\r\n               \"data\": \"it is elastic\"\r\n            }\r\n         }\r\n      ]\r\n   }\r\n```\r\nShouldn't analyzer setting be ignored for non-analyzed fields or at-least in the analyze api  for non-analyzed fields?\r\n\r\nTested in elasticsearch 1.6.0 and 2.0.0 beta snapshot"}}