Skip to content

Query setScrollTime not working on reactive search #1974

Closed

Description

@leejongchan

Probably there is no any setScrollTime process when using search method with reactiveElasticsearchTemplate.

Code

NativeSearchQuery nativeSearchQuery = new NativeSearchQueryBuilder()
   .withQuery(QueryBuilders.matchAllQuery())
   .build();
nativeSearchQuery.setScrollTime(Duration.ofHours(6));

var result = reactiveElasticsearchTemplate.search(nativeSearchQuery,ESChannelProduct.class).then();

Log

2021-10-26 16:52:36.408 DEBUG 76393 --- [main] o.s.w.r.f.client.ExchangeFunctions       : [-] HTTP POST {hidden url}/channelproduct/_search?typed_keys=true&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&scroll=1m&search_type=query_then_fetch&batched_reduce_size=512

Activity

  1. added this to the 4.3 GA (2021.1.0) milestone on Oct 26, 2021
  2. changed the title [-]NativeSearchQuery setScrollTime not working[/-] [+]Query setScrollTime not working on reactive search[/+] on Oct 26, 2021
  3. added 3 commits that reference this issue on Oct 26, 2021
    f1b4a54
    c1ab4d6
    2b3f173
  4. removed
    status: waiting-for-triage
    on Oct 26, 2021
  5. leejongchan commented on Oct 27, 2021

    @leejongchan
    ContributorAuthor

    hi, @sothawo. I have a question.

    Is there any way to use setScrollTime with spring-data-elasticsearch:4.1.5?
    I can not find how to set scroll time with this version.

  6. sothawo commented on Oct 28, 2021

    @sothawo
    Collaborator

    Query.setScrollTime(Duration) was added in verison 4.0. The fix from this issue has been backported to the 4.1.x branch. But I'm not sure if there will be a further service release as OSS support for 4.1 ends in November 2021 (https://github.com/spring-projects/spring-data-commons/wiki/Release-Train-Ockham-2020.0.0) and 4.1.14 was released 10 days ago.

    So you should better update to a more recent version of Spring Data Elasticsearch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions