随笔分类 -  ElasticSearch

摘要:查询索引列表信息并格式化为json: http://127.0.0.1:9021/_cat/indices?format=json&index=[索引名称,可使用通配符] 执行后获取到的结果集如下: [ { "health": "green", "status": "open", "index": 阅读全文
posted @ 2020-03-30 13:22 夏天の风 阅读(11598) 评论(0) 推荐(1)
摘要:使用ElasticSearch的默认配置会使我们在索引不存在于mapping中的字段时,会自动创建 我们可以设置关闭动态创建mapping 执行如下操作: PUT /索引名/索引类型/_mapping { "dynamic":false } 更严格一点可以设置不在mapping中的字段的数据不能写入 阅读全文
posted @ 2020-03-30 13:16 夏天の风 阅读(1494) 评论(0) 推荐(0)
摘要:elasticsearch默认输出最多一万条 查询第10001条数据开始就会报错:Result window is too large, from + size must be less than or equal to 但是很多时候10000数据不能满足项目的需求,所以我们就要解除这个限制。 解决 阅读全文
posted @ 2020-03-29 21:35 夏天の风 阅读(3945) 评论(0) 推荐(0)
摘要:一、准备工作 1、安装 JDK 2、服务器 2 台如下: IP地址 端口 192.168.1.1 9201 192.168.1.2 9201 二、安装前配置 1、使用 root 用户先进行以下内容的配置 vi /etc/security/limits.conf #添加如下内容: * soft nof 阅读全文
posted @ 2020-03-29 21:25 夏天の风 阅读(3354) 评论(0) 推荐(0)