基本环境
- elasticsearch版本:6.3.1
- 客户端环境:kibana 6.3.4、Java8应用程序模块。
其中kibana主要用于数据查询诊断和查阅日志,Java8为主要的客户端,数据插入和查询都是由Java实现的。
案例介绍
使用elasticsearch存储订单的主要信息,document内的field,基本上是long或keyword,创建索引的order.json文件如下:
{
"doc": {
"properties": {
"id": {
"type": "keyword",
"index": true
},
"status": {
"type": "byte",
"index": true
},
"createTime": {
"type": "long",
"index": true
},
"uid": {
"type": "long",
"index": true
},
"payment": {
"type": "keyword",
"index": true
},