数据持久化
数据先写入内存,同时记入trans log(默认5s持久化一次,有丢数据风险)。 内存数据1秒后可读。当log太长时或到时(30min),内存数据持久化进disk,同时删掉log.
https://www.elastic.co/guide/en/elasticsearch/guide/current/translog.html
Mapping文件定义
字段Index类型
analyzed:全文索引not_analyzed: 精确匹配索引
no:没有索引
与Spark集成
写入ES:
从ES读:
https://yq.aliyun.com/articles/52440