elsticsearch在kibanna中的操作

#建立索引
PUT /es_note_tel
{
  "settings": {
  "number_of_shards": 1
},
"mappings": {
  "products": {
   "properties": {
   "productName": {
   "type": "text"
       },
"size": {
  "type": "keyword"
}
}
}
}
}

#删除索引
DELETE /es_note_tel

#将数据导入es
POST /es_note_tel/products/_bulk
{"index":{}}
{"productName":"Latest art shirts for women in 2017 autumn","size":"L"}

#测试
GET /?pretty

#往索引中添加数据
PUT /es_note_tel/note_tel/1
{
"id":"asdf"
}

#查询文档
GET es_note_tel/note_tel/1

#简单搜索(搜索所有)
GET es_note_tel/note_tel/_search

作者:鹿鸣则
还有很多要学,还有很多要做
原文地址:https://www.cnblogs.com/XingLifeng/p/10065866.html