可查看更多程序人生资料: https://www.hryc.xyz/
1. 安装,和配置插件的环节这里不讲
2.创建集群 修改elasticsearch-1.7.0\config 目录下的 elasticsearch.yml 文件
3.使用head创建索引
4.刷新一下
5.插入类型数据
http://172.16.204.254:9200/
book/product/_mapping?pretty
{
"product": {
"properties": {
"title": {
"type": "string",
"store": "yes"
},
"description": {
"type": "string",
"index": "not_analyzed"
},
"price": {
"type": "double"
},
"onSale": {
"type": "boolean"
},
"type": {
"type": "integer"
},
"createDate": {
"type": "date"
}
}
}
}
6.插入完以后执行查询
可查看更多程序人生资料: https://www.hryc.xyz/