01 2019 档案

摘要:本篇博客主要是查看集群中的相关信息,具体请看代码和注释 @Test public void test45() throws UnknownHostException{ //1、指定es集群 cluster.name 是固定的key值,my-application是ES集群的名称 Settings s 阅读全文
posted @ 2019-01-21 01:12 陈远波 阅读(2452) 评论(0) 推荐(0) 编辑
摘要:1、terms分组查询 //分组聚合 @Test public void test40() throws UnknownHostException{ //1、指定es集群 cluster.name 是固定的key值,my-application是ES集群的名称 Settings settings = 阅读全文
posted @ 2019-01-21 01:10 陈远波 阅读(3005) 评论(0) 推荐(0) 编辑
摘要:1、CommonTersQuery: 指定字段进行模糊查询 //commonTermsQuery @Test public void test35() throws UnknownHostException{ //1、指定es集群 cluster.name 是固定的key值,my-applicati 阅读全文
posted @ 2019-01-21 01:06 陈远波 阅读(6021) 评论(0) 推荐(2) 编辑
摘要:1、max 最大值 //max 求最大值 @Test public void test30() throws UnknownHostException{ //1、指定es集群 cluster.name 是固定的key值,my-application是ES集群的名称 Settings settings 阅读全文
posted @ 2019-01-21 01:02 陈远波 阅读(9222) 评论(0) 推荐(0) 编辑
摘要:1、前缀查询(prefix) //prefix前缀查询 @Test public void test15() throws UnknownHostException { //1、指定es集群 cluster.name 是固定的key值,my-application是ES集群的名称 Settings 阅读全文
posted @ 2019-01-21 00:58 陈远波 阅读(10851) 评论(0) 推荐(1) 编辑
摘要:1、条件match query查询 //条件查询match query @Test public void test10() throws UnknownHostException { //1、指定es集群 cluster.name 是固定的key值,my-application是ES集群的名称 S 阅读全文
posted @ 2019-01-21 00:49 陈远波 阅读(16648) 评论(1) 推荐(2) 编辑
摘要:后期博客本人都只给出代码,具体的说明在代码中也有注释。 1、查询删除 //查询删除:将查询到的数据进行删除 @Test public void test8() throws UnknownHostException { //1、指定es集群 cluster.name 是固定的key值,my-appl 阅读全文
posted @ 2019-01-21 00:42 陈远波 阅读(8546) 评论(0) 推荐(0) 编辑
摘要:java操作elasticsearch实现批量添加主要使用了bulk 代码如下: //bulk批量操作(批量添加) @Test public void test7() throws IOException { //1、指定es集群 cluster.name 是固定的key值,my-applicati 阅读全文
posted @ 2019-01-21 00:35 陈远波 阅读(25342) 评论(2) 推荐(1) 编辑
摘要:一、在进行java操作elasticsearch之前,请确认好集群的名称及对应的ES节点ip和端口 1、查看ES的集群名称 #进入elasticsearch.yml配置文件/opt/elasticsearch-6.4.3/config vim elasticsearch.yml 2、查询ip 二、根 阅读全文
posted @ 2019-01-21 00:24 陈远波 阅读(17648) 评论(0) 推荐(3) 编辑
摘要:在创建项目之前请确认maven是否安装好,在此我是以环境都搭建好的情况下进行示范,现在以eclipse开发工具为例,具体操作如下: 1、创建maven项目 File - new -other 2、在pom文件中导入对应的jar包坐标 在此我没有添加log4j等坐标,需要的根据自己需要进行添加jar包 阅读全文
posted @ 2019-01-21 00:07 陈远波 阅读(957) 评论(0) 推荐(0) 编辑
摘要:1、建立properts文件(error.message.properties) 2、在spring-mvc.xml文件(applicationContext-mvc.xml)中配置properties工具类路径及读取properties文件的路径 3、建立properts读取工具类 4、建立对应的 阅读全文
posted @ 2019-01-19 11:35 陈远波 阅读(582) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示