{"action":"closed","issue":{"url":"https://api.github.com/repos/medcl/elasticsearch-analysis-pinyin/issues/8","repository_url":"https://api.github.com/repos/medcl/elasticsearch-analysis-pinyin","labels_url":"https://api.github.com/repos/medcl/elasticsearch-analysis-pinyin/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/medcl/elasticsearch-analysis-pinyin/issues/8/comments","events_url":"https://api.github.com/repos/medcl/elasticsearch-analysis-pinyin/issues/8/events","html_url":"https://github.com/medcl/elasticsearch-analysis-pinyin/issues/8","id":23369518,"number":8,"title":"elasticsearch 0.90.2 升级到0.90.7 default_operator参数不生效","user":{"login":"huxinghai1988","id":1279304,"avatar_url":"https://avatars.githubusercontent.com/u/1279304?v=3","gravatar_id":"","url":"https://api.github.com/users/huxinghai1988","html_url":"https://github.com/huxinghai1988","followers_url":"https://api.github.com/users/huxinghai1988/followers","following_url":"https://api.github.com/users/huxinghai1988/following{/other_user}","gists_url":"https://api.github.com/users/huxinghai1988/gists{/gist_id}","starred_url":"https://api.github.com/users/huxinghai1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huxinghai1988/subscriptions","organizations_url":"https://api.github.com/users/huxinghai1988/orgs","repos_url":"https://api.github.com/users/huxinghai1988/repos","events_url":"https://api.github.com/users/huxinghai1988/events{/privacy}","received_events_url":"https://api.github.com/users/huxinghai1988/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2013-11-27T06:32:25Z","updated_at":"2016-08-22T16:25:40Z","closed_at":"2016-08-22T16:25:39Z","body":"```SHELL\r\ncurl -XPUT 'http://localhost:9200/medcl/' -d'\r\n{\r\n    \"index\" : {\r\n        \"analysis\" : {\r\n            \"analyzer\" : {\r\n                \"pinyin_analyzer\" : {\r\n                    \"tokenizer\" : \"my_pinyin\",\r\n                    \"filter\" : [\"standard\",\"nGram\"]\r\n                }\r\n            },\r\n            \"tokenizer\" : {\r\n                \"my_pinyin\" : {\r\n                    \"type\" : \"pinyin\",\r\n                    \"first_letter\" : \"prefix\",\r\n                    \"padding_char\" : \"\"\r\n                }\r\n            }\r\n        }\r\n    }\r\n}'\r\n\r\ncurl -XPOST 'http://localhost:9200/medcl/folks/_mapping' -d'\r\n{\r\n    \"folks\": {\r\n        \"properties\": {\r\n            \"name\": {\r\n                \"type\": \"multi_field\",\r\n                \"fields\": {\r\n                    \"name\": {\r\n                        \"type\": \"string\",\r\n                        \"store\": \"no\",\r\n                        \"term_vector\": \"with_positions_offsets\",\r\n                        \"analyzer\": \"pinyin_analyzer\",\r\n                        \"boost\": 10\r\n                    },\r\n                    \"primitive\": {\r\n                        \"type\": \"string\",\r\n                        \"store\": \"yes\",\r\n                        \"analyzer\": \"keyword\"\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n}'\r\n\r\ncurl -XPOST 'http://localhost:9200/medcl/folks/andy' -d'{\"name\":\"刘德华\"}'\r\ncurl -XPOST 'http://localhost:9200/medcl/folks/xiaom' -d'{\"name\":\"刘小明\"}'\r\n\r\ncurl 'http://localhost:9200/medcl/folks/_search?pretty' -d '{\r\n  \"query\": {\r\n    \"query_string\":{\r\n      \"query\": \"name:dehua\",\r\n      \"default_operator\": \"AND\"\r\n    }\r\n  }\r\n}'\r\n```\r\n\r\n0.90.7 查询结果小明与德华多匹配成功了！ \r\n0.90.2 只会把德华匹配出来\r\n\r\n\r\n"}}
{"actor":{"display_login":"medcl"}}