【发布时间】:2020-10-28 21:29:36
【问题描述】:
我是 elasticsearch 新手,我正在使用 spring data elasticsearch (https://docs.spring.io/spring-data/elasticsearch/docs/current/reference/html/#reference)。
这是我的 pom.xml
<properties>
<spring-data-elasticsearch.version>3.2.6</spring-data-elasticsearch.version>
...
<!-- Elasticsearch -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId>
<version>${spring-data-elasticsearch.version}.RELEASE</version>
</dependency>
</properties>
我有密码
Iterable<Data> dataList = this.dataRepository.findAll();
我的 DataRepository 就是这样
public interface DataRepository extends ElasticsearchRepository<myData, String> {
}
我收到了错误
"Result window is too large, from + size must be less than or equal to: [10000] but was [331576]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"dfs","grouped":true,"failed_shards":[{"shard":0,"index":"hardwarezone_index","node":"Psv3GnjpQ52aNB52QfvWWw","reason":{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [331576]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting."}}]},"status":500}
我需要检索所有数据以对其进行一些处理。我该怎么做?
【问题讨论】:
标签: spring-boot elasticsearch spring-data-jpa