{"action":"opened","issue":{"url":"https://api.github.com/repos/dadoonet/spring-elasticsearch/issues/89","labels_url":"https://api.github.com/repos/dadoonet/spring-elasticsearch/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/dadoonet/spring-elasticsearch/issues/89/comments","events_url":"https://api.github.com/repos/dadoonet/spring-elasticsearch/issues/89/events","html_url":"https://github.com/dadoonet/spring-elasticsearch/issues/89","id":121995008,"number":89,"title":"How to make more flexible control on the Mapping settings ?","user":{"login":"lemon-zmd","id":1396490,"avatar_url":"https://avatars.githubusercontent.com/u/1396490?v=3","gravatar_id":"","url":"https://api.github.com/users/lemon-zmd","html_url":"https://github.com/lemon-zmd","followers_url":"https://api.github.com/users/lemon-zmd/followers","following_url":"https://api.github.com/users/lemon-zmd/following{/other_user}","gists_url":"https://api.github.com/users/lemon-zmd/gists{/gist_id}","starred_url":"https://api.github.com/users/lemon-zmd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lemon-zmd/subscriptions","organizations_url":"https://api.github.com/users/lemon-zmd/orgs","repos_url":"https://api.github.com/users/lemon-zmd/repos","events_url":"https://api.github.com/users/lemon-zmd/events{/privacy}","received_events_url":"https://api.github.com/users/lemon-zmd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-14T08:20:28Z","updated_at":"2015-12-14T08:20:28Z","closed_at":null,"body":"I am a user of the spring elastic search and it really brings big convenience to me. I now manage the ES mapping settings using a java bean with annotations , but I met the following troubles\r\n1, @Field I can't configure a field name that is not equal to the java variable name. So the name like \"a-b\" is not accepted.\r\n2,  I want to define the flatten mappings like : \r\n\"index-name\": {\r\n      \"mappings\": {\r\n         \"type-name\": {\r\n            \"_all\": {\r\n               \"enabled\": false\r\n            },\r\n            \"properties\": {\r\n               \"a.displayName\": {\r\n                  \"type\": \"string\",\r\n                  \"index\": \"not_analyzed\"\r\n               },\r\n               \"a.realName\": {\r\n                  \"type\": \"string\",\r\n                  \"index\": \"not_analyzed\"\r\n               }, ...\r\nand I want to have the class like : ( because it can really make entity design easier )\r\n@Document(indexName = \"index-name\", type = \"type-name\")\r\npublic class TDocument {\r\n    static class A{\r\n        @Field(type = FieldType.String, index= FieldIndex.analyzed)\r\n        String displayName;\r\n        @Field(type = FieldType.String, index= FieldIndex.analyzed)\r\n        String realName;\r\n    }\r\n   @Field(type=FieldType.Object)\r\n   A a;\r\n}\r\nIs there anything I can customize?\r\nThanks a lot !"}}