mirror of
https://gitee.com/dromara/easy-es.git
synced 2025-12-06 17:18:57 +08:00
update easy-es-core/src/main/java/cn/easyes/core/conditions/WrapperProcessor.java.
Signed-off-by: 吴凯雄 <542538987@qq.com>
This commit is contained in:
parent
ef7732f303
commit
079a503c24
@ -222,14 +222,11 @@ public class WrapperProcessor {
|
|||||||
Optional.ofNullable(wrapper.from).ifPresent(searchSourceBuilder::from);
|
Optional.ofNullable(wrapper.from).ifPresent(searchSourceBuilder::from);
|
||||||
MyOptional.ofNullable(wrapper.size).ifPresent(searchSourceBuilder::size, DEFAULT_SIZE);
|
MyOptional.ofNullable(wrapper.size).ifPresent(searchSourceBuilder::size, DEFAULT_SIZE);
|
||||||
|
|
||||||
if (searchSourceBuilder.size() > DEFAULT_SIZE) {
|
// 根据全局配置决定是否开启
|
||||||
// 查询超过一万条, trackTotalHists自动开启
|
if (GlobalConfigCache.getGlobalConfig().getDbConfig().isEnableTrackTotalHits()) {
|
||||||
searchSourceBuilder.trackTotalHits(true);
|
searchSourceBuilder.trackTotalHits(Boolean.TRUE);
|
||||||
} else {
|
|
||||||
// 根据全局配置决定是否开启
|
|
||||||
searchSourceBuilder.trackTotalHits(GlobalConfigCache.getGlobalConfig().getDbConfig().isEnableTrackTotalHits());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return searchSourceBuilder;
|
return searchSourceBuilder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user