Dear all,
dev info:
- elasticsearch 7.17.1
- spring boot 2.6.12
- spring-data-elasticsearch 4.3.7
I have a code as below:
public interface LogRepository<T, ID> extends ElasticsearchRepository<T, ID>
Stream<T> findScrollByUri(String uri);
}
If it runs, it sends a http request as below:
POST /log/_search?typed_keys=true&max_concurrent_shard_requests=5&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&ignore_throttled=true&scroll=60000ms&search_type=query_then_fetch&batched_reduce_size=512
The scroll is 60000ms. I can't change this value. How to change it?
It is my client configuration.
public RestHighLevelClient elasticsearchRestHighLevelClient() {
final ClientConfiguration clientConfiguration = ClientConfiguration.builder()
.connectedTo(elasticsearchProperty.getHost() + ":" + elasticsearchProperty.getPort())
.withConnectTimeout(Duration.ofMillis(elasticsearchProperty.getConnectTimeout()))
.withSocketTimeout(Duration.ofMillis(elasticsearchProperty.getSocketTimeout()))
// .withClientConfigurer(
// RestClients.RestClientConfigurationCallback.from(clientBuilder -> {
// clientBuilder.
// return clientBuilder;
// }))
.build();
return RestClients.create(clientConfiguration).rest();
}