public class LambdaEsIndexWrapper<T> extends Wrapper<T> implements Index<LambdaEsIndexWrapper<T>,cn.easyes.common.params.SFunction<T,?>>
Copyright © 2021 xpc1024 All Rights Reserved
| 限定符和类型 | 字段和说明 |
|---|---|
protected String |
aliasName
别名
|
protected String |
indexName
索引名称
|
protected Map<String,Object> |
mapping
用户手动指定的索引mapping信息,优先级最高
|
protected Integer |
replicasNum
副本数
|
protected org.elasticsearch.common.settings.Settings |
settings
用户手动指定的索引settings,优先级最高
|
protected Integer |
shardsNum
分片数
|
protected LambdaEsIndexWrapper<T> |
typedThis
此包装类本身
|
enableMust2Filter| 构造器和说明 |
|---|
LambdaEsIndexWrapper()
不建议直接 new 该实例,使用 Wrappers.lambdaQuery(entity)
|
LambdaEsIndexWrapper(Class<T> entityClass) |
| 限定符和类型 | 方法和说明 |
|---|---|
LambdaEsIndexWrapper<T> |
createAlias(String aliasName)
设置创建别名信息
|
protected org.elasticsearch.action.search.SearchRequest |
getSearchRequest()
获取查询条件 待优化
|
LambdaEsIndexWrapper<T> |
indexName(String indexName)
设置索引名称
|
LambdaEsIndexWrapper<T> |
join(String column,
String parentName,
String childName)
设置父子类型信息
|
LambdaEsIndexWrapper<T> |
mapping(Map<String,Object> mapping)
用户自行指定mapping
|
LambdaEsIndexWrapper<T> |
mapping(String column,
cn.easyes.common.enums.FieldType fieldType,
String analyzer,
String searchAnalyzer,
String dateFormat,
Float boost)
设置mapping信息
|
LambdaEsIndexWrapper<T> |
settings(Integer shards,
Integer replicas)
设置索引的分片数和副本数
|
LambdaEsIndexWrapper<T> |
settings(org.elasticsearch.common.settings.Settings settings)
用户手动指定的settings
|
protected String indexName
protected String aliasName
protected Integer shardsNum
protected Integer replicasNum
protected org.elasticsearch.common.settings.Settings settings
protected final LambdaEsIndexWrapper<T> typedThis
public LambdaEsIndexWrapper()
protected org.elasticsearch.action.search.SearchRequest getSearchRequest()
WrappergetSearchRequest 在类中 Wrapper<T>public LambdaEsIndexWrapper<T> indexName(String indexName)
IndexindexName 在接口中 Index<LambdaEsIndexWrapper<T>,cn.easyes.common.params.SFunction<T,?>>indexName - 索引名称public LambdaEsIndexWrapper<T> settings(Integer shards, Integer replicas)
Indexsettings 在接口中 Index<LambdaEsIndexWrapper<T>,cn.easyes.common.params.SFunction<T,?>>shards - 分片数replicas - 副本数public LambdaEsIndexWrapper<T> settings(org.elasticsearch.common.settings.Settings settings)
Indexsettings 在接口中 Index<LambdaEsIndexWrapper<T>,cn.easyes.common.params.SFunction<T,?>>settings - settingspublic LambdaEsIndexWrapper<T> mapping(Map<String,Object> mapping)
Indexmapping 在接口中 Index<LambdaEsIndexWrapper<T>,cn.easyes.common.params.SFunction<T,?>>mapping - mapping信息public LambdaEsIndexWrapper<T> mapping(String column, cn.easyes.common.enums.FieldType fieldType, String analyzer, String searchAnalyzer, String dateFormat, Float boost)
Indexmapping 在接口中 Index<LambdaEsIndexWrapper<T>,cn.easyes.common.params.SFunction<T,?>>column - 列名fieldType - es中的类型analyzer - 分词器类型searchAnalyzer - 查询分词器类型dateFormat - 日期格式boost - 字段权重值public LambdaEsIndexWrapper<T> createAlias(String aliasName)
IndexcreateAlias 在接口中 Index<LambdaEsIndexWrapper<T>,cn.easyes.common.params.SFunction<T,?>>aliasName - 别名Copyright © 2022. All rights reserved.