如何用curl向elasticsearch添加数据
```
curl -H "Content-Type: application/json" -XPUT '192.168.2.238:9200/articles/article/8236' -d '{"id" : 8236 ,"title":"elasticsearch中文分词插件ik安装及测试"}'
curl -H "Content-Type: application/json" -XPUT '192.168.2.238:9200/articles/article/8235' -d '{"id" : 8235 ,"title":"elasticsearch默认standard分词测试analyzer"}'
curl -H "Content-Type: application/json" -XPUT '192.168.2.238:9200/articles/article/8233' -d '{"id" : 8233 ,"title":"docker安装elasticsearch全文检索引擎"}'
```
然后在elasticsearch-head中查找
```
{
"query": {
"multi_match": {
"query": "jumpserver",
"fields": [
"title"
]
}
},
"highlight": {
"fields": {
"title": {}
}
}
}
```
![](https://static.yuanchengzhushou.cn/image/8238.jpg)