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

[DOCS] Change ctx.payload.hits.total.value to ctx.payload.hits.total #65874

Merged
merged 3 commits into from
Dec 8, 2020

Conversation

Erni
Copy link
Contributor

@Erni Erni commented Dec 4, 2020

ctx.payload.hits.total.value is no longer valid. The proper way to get the total hits is ctx.payload.hits.total

`ctx.payload.hits.total.value` is no longer valid. The proper way to get the total hits is `ctx.payload.hits.total`
@Erni Erni requested a review from jimczi December 4, 2020 10:36
@jrodewig
Copy link
Contributor

jrodewig commented Dec 7, 2020

@elasticmachine update branch

@elasticmachine elasticmachine added Team:Data Management Meta label for data/management team Team:Docs Meta label for docs team labels Dec 7, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (Team:Core/Features)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@jrodewig
Copy link
Contributor

jrodewig commented Dec 7, 2020

Thanks for opening this @Erni. I added a few more instances from our Watcher docs with d8ae78f.

@jrodewig jrodewig changed the title Wrong access to total hits [DOCS] Change ctx.payload.hits.total.value to ctx.payload.hits.total Dec 7, 2020
Copy link
Contributor

@jakelandis jakelandis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. FWIW the total.value is what is required if rest_total_hits_as_int is set to false. It defaults to true today, but will likely default to false for 8.0: #38387

Also, it turns out that you can't actually store a watch with rest_total_hits_as_int is set to false today: #65988

If/when we implement #38387 we will need to change this documentation back to using .value ...but I agree for now lets document the default

@jrodewig
Copy link
Contributor

jrodewig commented Dec 8, 2020

Thanks @jakelandis.

@jrodewig jrodewig merged commit 43fa468 into 7.10 Dec 8, 2020
@jrodewig jrodewig deleted the wrong-access-total-hits branch December 8, 2020 14:22
jrodewig added a commit that referenced this pull request Dec 8, 2020
…al` (#65874) (#66032)

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Ernesto Reig <ernesto.reig@gmail.com>
jrodewig added a commit that referenced this pull request Dec 8, 2020
…al` (#65874) (#66031)

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Ernesto Reig <ernesto.reig@gmail.com>
@jakelandis jakelandis removed the v8.0.0 label Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Watcher >docs General docs changes Team:Data Management Meta label for data/management team Team:Docs Meta label for docs team v7.10.2 v7.11.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants