I am new to elasticsearch and im using spring data elasticsearch as such (https://docs.spring.io/spring-data/elasticsearch/docs/current/reference/html/#reference).
This is my 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>
I have the code
Iterable<Data> dataList = this.dataRepository.findAll();
My DataRepository is as such
public interface DataRepository extends ElasticsearchRepository<myData, String> {
}
I am getting the error
"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}
I need to retrieve all the data to do some processing on it. How can i do this?