elasticsearch下载安装
elasticsearch以下相关内容安装
elasticsearch-head下载安装
-
https://nodejs.org/en/download/
-
安装node.js
一路默认安装,安装地址可以自行修改。 安装时有一个勾选项,是否添加到path路径,记得勾上。
-
下载elasticsearch-head
-
在该文件夹目录下,打开命令窗口,运行命令: npm install
java代码调用
使用RestHighLevelClient 连接elasticsearch
关于RestHighLevelClient 的初始化配置等,
原创链接 :https://blog.csdn.net/qq1107533660/article/details/83347358
-
批量导入
indexName: 索引
table: 因elasticsearch6.X之后弱化了type 类型的概念, 此处参数为了区分不通的索引
idName: 数据id名字
bulks: list数组,数组元素,此处为Map,实体类对象应该也是可以
-
简单查询
网友评论