# How to change scroll time in spring data repository

**URL:** <https://discuss.elastic.co/t/how-to-change-scroll-time-in-spring-data-repository/320314>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [December 2, 2022, 2:54am UTC](https://discuss.elastic.co/t/how-to-change-scroll-time-in-spring-data-repository/320314 "2022-12-02T02:54:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mzinboy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mzinboy/32/100249_2.png) [@mzinboy](https://discuss.elastic.co/u/mzinboy)\
**Post date:** [December 2, 2022, 2:54am UTC](https://discuss.elastic.co/t/how-to-change-scroll-time-in-spring-data-repository/320314/1 "2022-12-02T02:54:54Z")

</div>

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:

```auto
public interface LogRepository<T, ID> extends ElasticsearchRepository<T, ID>
    Stream<T> findScrollByUri(String uri);
}

```

If it runs, it sends a http request as below:

```auto
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.

```auto
    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();
    }

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 30, 2022, 2:55am UTC](https://discuss.elastic.co/t/how-to-change-scroll-time-in-spring-data-repository/320314/2 "2022-12-30T02:55:08Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
