jillesvangurp/kt-search

[BUG] SearchClient fails to delete scroll due to incorrect request path

Closed this issue · 1 comments

Describe the bug

SearchClient.deleteScroll method sends a DELETE request to an incorrect path: /scroll/<id> instead of /_search/scroll/<id> (see docs).

This also affects SearchClient.scroll(response: SearchResponse), which is expected to delete the scroll at the end by using SearchClient.deleteScroll.

To Reproduce

  1. Call SearchClient.deleteScroll(id)
  2. Call SearchClient.scroll(id).

Expected: 404: No search context found for id
Actual: the next batch of search results is returned

Will you be able to help with a pull request?

I am going to open a PR that fixes the SearchClient.deleteScroll implementation right away.

Thanks for this! Somehow this slipped through. I think searchAfter is recommended now, which is what I mostly use.