在 ES5.X版本,你可以这样写
http://localhost:9200/_analyze?analyzer=ik_smart&pretty=true&text=”刘翔是中国飞人“
但是在ES6.x的版本,你用上面的写法测试,会报错,请求参数被要求:
"type": "parse_exception",
"reason": "request body or source parameter is required"
正确写法,参数以json的形式写在请求体:(pretty不用写)