文章目录
一:配置 — Domain – 实体类模型 – 域
1.1:@Document注解 – 副本/分片/索引等 — 讲解
1.1.0:注意:ES 6.0.0以后ndex一个索引对应一个type(mysql 库里的表)
每个index有shard分片存储文件,相互独立。
1.1.1:@Document元注解参数和使用
public @interface Document {
String indexName();
boolean useServerConfiguration() default false;
/**
* 分片:默认一个,一个分片有多个副本
* 集群多节点部署,分担压力
* 更改索引操作,称为主分片
*/
short shards() default 1;
/**
* 副本: 分片的复制,多个副本对应一个分片
*/
short replicas() default 1;
/