Elasticsearch:分页

分页

  • 版本
  • from-size分页
  • scroll分页
  • search-after分页

版本

{
	"name": "35Ek144",
	"cluster_name": "elasticsearch",
	"cluster_uuid": "bQ6k0KgBSOi6XDQrBwc9YA",
	"version": {
		"number": "5.6.4",
		"build_hash": "8bbedf5",
		"build_date": "2017-10-31T18:55:38.105Z",
		"build_snapshot": false,
		"lucene_version": "6.6.1"
	},
	"tagline": "You Know, for Search"
}
<dependency>
	<groupId>org.springframework.bootgroupId>
	<artifactId>spring-boot-starter-data-elasticsearchartifactId>
	<version>2.1.5.RELEASEversion>
dependency>

@Field不支持name属性

from-size分页

只能查询前10000条数据,超过会报Result window is too large异常信息,可以通过设置index.max_result_window参数

scroll分页

size不能超过10000,超过会报Batch size is too large异常信息,可以通过设置index.max_result_window参数

search-after分页

你可能感兴趣的:(elasticsearch)