Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow not to extend keep alive of Point in Time #1524

Closed
pongraczgabor87 opened this issue Aug 17, 2021 · 1 comment
Closed

Allow not to extend keep alive of Point in Time #1524

pongraczgabor87 opened this issue Aug 17, 2021 · 1 comment
Milestone

Comments

@pongraczgabor87
Copy link

Which version of Elastic are you using?

[x] elastic.v7 (for Elasticsearch 7.x)
[ ] elastic.v6 (for Elasticsearch 6.x)
[ ] elastic.v5 (for Elasticsearch 5.x)
[ ] elastic.v3 (for Elasticsearch 2.x)
[ ] elastic.v2 (for Elasticsearch 1.x)

Please describe the expected behavior

Based on the elasticsearch documentation during the _search the keep_alive parameter is optional, it's only needed if you would like to extend the TTL of the given point in time.

Please describe the actual behavior

  • I couldn't leave out the keep_alive from the request.
  • If I try to set it to empty string I receive an error from elasticsearch: Error 400 (Bad Request): [1:762] [pit] failed to parse field [keep_alive] [type=x_content_parse_exception].
  • If I try to set it to 0, something strange happens in the elasticsearch, the PIT is not removed as expected.

Any steps to reproduce the behavior?

searchResult, err := client.Search().
		// Index(testIndexName). // <-- you may not use indices with PointInTime!
		Query(NewMatchAllQuery()).
		PointInTime(NewPointInTime(pitResp.Id, "")). // or "0m", "0s", etc...
		Size(100).
		Pretty(true).
		Do(context.TODO())

Proposal

Make keep_alive optional.

@olivere
Copy link
Owner

olivere commented Aug 30, 2021

Yep. Fixed in 7.0.28. Thanks.

@olivere olivere closed this as completed Aug 30, 2021
olivere added a commit that referenced this issue Aug 30, 2021
The keep alive parameter for the PIT is optional.

Close #1524
dungnx pushed a commit to dungnx/elastic that referenced this issue Sep 16, 2021
The keep alive parameter for the PIT is optional.

Close olivere#1524
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants