【发布时间】:2020-01-20 08:54:36
【问题描述】:
spring data elastisearch 如何使用 offset 和 limit 进行查询。我想使用偏移量和限制参数来查询页面。但是我找不到方法支持。例如:
queryBuild.withPageable(PageRequest.of(pageIndex, pageSize));
Page<Content> content = elasticsearchOperations.queryForPage(queryBuild.build(),Content.class);
应该没问题
但我找不到带有偏移量和限制的方法
queryBuild.withPageable(PageRequest.of(offset, limit));
【问题讨论】: