
elasticsearch
文章平均质量分 70
CottonDuke
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
ES 建索引
ES 建动态模板索引,设置String 类型写入时,在ES里面设置索引类型为keyword ,避免提前建索引。PUT /index_name{ "settings": { "index": { "number_of_shards": "5", "refresh_interval": "5s", "number_of_r...原创 2020-04-29 13:54:07 · 436 阅读 · 0 评论 -
ES5.4.1 命令
1count 命令curl -XGET 'http://10.202.33.206:9200/incbdpiforder/_count' -d'{"query":{"range": {"timestamp":{"gt": "now-5m","lt": "now"}}}}'2删除命令 incDay是字符串类型,格式:2017-10-10curl -XPO...原创 2017-08-03 19:57:50 · 607 阅读 · 0 评论 -
es常用命令
按条件查询,将查询结果存储在文件中,size不能超过10000curl -XPOST http://ipaddress:9200/incbdpiforder/orders/_search?pretty -d '{"query": {"bool": {"must": [{"term": {"incDay": "20170502"}},{"term&qu原创 2017-05-02 11:56:18 · 984 阅读 · 0 评论 -
es 配置
官网信息 https://www.elastic.co/guide/en/elasticsearch/hadoop/master/configuration.htmles.nodes.wan.only (default false)Whether the connector is used against an Elasticsearch instance in a cloud原创 2017-12-04 18:05:42 · 1718 阅读 · 0 评论 -
spark写数据到装有searchgard的ES集群
增加配置信息val conf = new SparkConf()conf.setAppName("etl_data_to_es")conf.set("es.net.ssl", "true")conf.set("es.net.ssl.truststore.location", "truststore.jks")conf.set("es.net.ssl.protocol", "TLSv1原创 2017-12-11 10:54:49 · 1432 阅读 · 0 评论 -
es 建索引时指定分片数据和副本数
1指定分片数量 "number_of_shards":82指定副本数量 "number_of_replicas" : 13指定刷新时间30s,写入数据时,查看到的数据与真实数据有30s的延时 "refresh_interval":"30s"4禁用_all 字段 "_all":{ "enabled": false}curl -XDELETE 'http://'原创 2017-11-04 15:11:45 · 10840 阅读 · 0 评论 -
curl 发送http 请求
curl 模拟post请求后面 >>aa.txt是将输出重定向,也可以不写curl -H "Content-Type:application/json" -X POST --data '{"invoice_id":"051","bill_number":"1","doc_total":12,"file_dir":"/nfsc/EIS_CORE/ESG-TPI-CORE/BB01","r原创 2017-10-18 20:50:03 · 893 阅读 · 1 评论 -
hive 数据写入es
环境:es 2.2.1 hadoop 2.7.3hive 2.2.1利用插件讲hive里面的数据写入es在es可下载插件 elasticsearch-hadoop-2.2.0.jar比如要把basic_table里的数据写到es里面1、首先则hive里面建表drop table if exists basic_table_es;create原创 2017-07-28 15:22:37 · 2204 阅读 · 0 评论 -
kibana 查询语法
1逻辑语法: And OR 也能用()分组,相当于先执行括号里的命令 2 字段前面加上+ 表示必须包含此字段,-表示不包含此字段3以下字符当作值搜索的时候需要用\转义+ - && || ! () {} [] ^" ~ * ? : \例子:+orderCategory:1 And +sendStoreCode:"G02101023" And +operat原创 2017-06-19 12:39:34 · 1125 阅读 · 0 评论 -
elasticsearch基础及java编程
elasticsearch mysql对应关系MySQL elasticsearchdatabase(数据库)index(索引库)table(表)type(类型)row(行)document(文档)column(列) field(字段)Elasticsearch是一个基于L转载 2016-11-27 18:42:09 · 1015 阅读 · 0 评论 -
es 分页两种方法
Elasticsearch——分页查询From&Size VS scrollElasticsearch中数据都存储在分片中,当执行搜索时每个分片独立搜索后,数据再经过整合返回。那么,如果要实现分页查询该怎么办呢?更多内容参考Elasticsearch资料汇总按照一般的查询流程来说,如果我想查询前10条数据:1 客户端请求发给某个节点2 节点转发给转载 2017-04-18 18:11:14 · 18054 阅读 · 1 评论 -
elasticSearch 时间类型
Elasticsearch Date类型使用技巧作者: rockybean 时间: February 27, 2015 分类: 技术elasticsearch原生支持date类型,结合该类型和Kibana可以做出漂亮有用的图表。这里简单记录下使用的方法。使用date类型可以用如下两种方式:使用毫秒的时间戳,直接将毫秒值传入即可。传入格式化的字符串转载 2017-04-10 17:07:22 · 13067 阅读 · 0 评论