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

fix description of from and size example #28320

Merged
merged 1 commit into from Jan 25, 2018
Merged

Conversation

alexmorosmarco
Copy link
Contributor

from means where to start and size means how many results so the response cannot be elements from 11 to 20, the response is elements from 10 to 19.

`from` means where to start and `size` means how many results so the response cannot be elements from 11 to 20, the response is elements from 10 to 19.
@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

1 similar comment
@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

Copy link
Member

@cbuescher cbuescher left a comment

Choose a reason for hiding this comment

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

@alexmorosmarco I agree, as a developer I find your change to the docs more natural, even though if you don't assume 0-based counting for the search results if might make more sense to start with 11 here? I agree with your argument though and will merge this change if noboby else objects in a short period of time. Could you sign the CLA in the meantime?

@alexmorosmarco
Copy link
Contributor Author

Hi, thanks to answer so quick
I don't understand your point. The example shows "from": 10 and "size": 10. For those values the result will be documents from 10 to 19.
I find the example perfect but the explanation wrong. I think it is a good example because if a developer wants to make pages of 10 items, the first page would be "from": 0 and "size": 10 what would return documents from 0 to 9, then 10 to 19, then 20 to 29... Can you know repeat your explanation please?

Same wrong conclussion is in the Elastic last documentation, I guess you can check all the versions and fix it everywhere.

Please, can you tell me where to sign the CLA?

@cbuescher
Copy link
Member

cbuescher commented Jan 23, 2018

what would return documents from 0 to 9

I agree with your point of view, I was just pointing out that for some people that are not used to 0-based counting those would be documents 1-10. But since from is zero based, this change makes sense to me. I was just pointing out one probable reasons why this maybe was done differently.

I guess you can check all the versions and fix it everywhere

We usually merge smaller documentation changes like this with past versions, but probably not to all of them. Usually down to the last release of the last mayor version (that would be the 5.6 branch in this case)

Please, can you tell me where to sign the CLA?

You can follow the steps at https://www.elastic.co/contributor-agreement

@alexmorosmarco
Copy link
Contributor Author

Hi, about your 1st point I understand. But this is a technical documentation so we cannot explain something incoherent or we cannot explain "the numbers" in a non technical (non 0-based) way. Otherwise it is confusing.

About merging this in other versions, I think it is wrong explanation that should be fixed in all the versions. I detected it in 2.4 but of course it is present in 6.1. Please could you apply it in all of them?

I have signed the CLA. Thanks!

@alexmorosmarco
Copy link
Contributor Author

I take the opportunity to ask you something.
I have seen a big problem of documentation. I have created an issue for it cause I cannot make a change proposal via PR as I do not know what should be written. So I have made some questions and describe what I see missing.
The issue is this one:
#28363

Do you know if someone will be assigned or how it works?
Thanks!

@cbuescher
Copy link
Member

To answer the last question first: opening an issue if you think some parts of the docs are misleading or not easy to understand is exactly the right thing to do, thanks for doing that. These issues usually get labeled and then taken of the stack whenever somebody (including members from the community jumping in) feels like they can contribute something, but there is no definite commitment in terms of timing for these things. As you can see there are quiet a lot of open issues, but docs are usually picked up faster than other things. Hope this helps.

@cbuescher
Copy link
Member

About merging this in other versions, I think it is wrong explanation that should be fixed in all the versions. I detected it in 2.4 but of course it is present in 6.1. Please could you apply it in all of them?

We usually merge changes like this to all branches in the current major version and the last on the previous minors that are still supported. So in this case this can go to 2.4, 5.6 and all 6.x branches.

Copy link
Member

@cbuescher cbuescher left a comment

Choose a reason for hiding this comment

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

LGTM since there is no a argument against this channge, but several in favour. Going to merge this, thanks @alexmorosmarco

@cbuescher cbuescher merged commit 4afa12c into elastic:2.4 Jan 25, 2018
cbuescher pushed a commit that referenced this pull request Jan 25, 2018
cbuescher pushed a commit that referenced this pull request Jan 25, 2018
cbuescher pushed a commit that referenced this pull request Jan 25, 2018
cbuescher pushed a commit that referenced this pull request Jan 25, 2018
cbuescher pushed a commit that referenced this pull request Jan 25, 2018
cbuescher pushed a commit that referenced this pull request Jan 25, 2018
martijnvg added a commit that referenced this pull request Jan 25, 2018
* es/master:
  [Docs] Fix explanation for `from` and `size` example (#28320)
  Adapt bwc version after backport #28358
  Always return the after_key in composite aggregation response (#28358)
  Adds test name to MockPageCacheRecycler exception (#28359)
  Adds a note in the `terms` aggregation docs regarding pagination (#28360)
  [Test] Fix DiscoveryNodesTests.testDeltas() (#28361)
  Update packaging tests to work with meta plugins (#28336)
  Remove Painless Type from MethodWriter in favor of Java Class. (#28346)
  [Doc] Fixs typo in reverse-nested-aggregation.asciidoc (#28348)
  Reindex: Shore up rethrottle test
  Only assert single commit iff index created on 6.2
  isHeldByCurrentThread should return primitive bool
  [Docs] Clarify `html` encoder in highlighting.asciidoc (#27766)
  Fix GeoDistance query example (#28355)
  Settings: Introduce settings updater for a list of settings (#28338)
  Adapt bwc version after backport #28310
martijnvg added a commit that referenced this pull request Jan 25, 2018
* es/6.x:
  [Docs] Fix explanation for `from` and `size` example (#28320)
  Adapt bwc version after backport #28358
  Always return the after_key in composite aggregation response (#28358)
  Adds a note in the `terms` aggregation docs regarding pagination (#28360)
  Update packaging tests to work with meta plugins (#28336)
  Remove Painless Type from MethodWriter in favor of Java Class. (#28346)
  [Doc] Fixs typo in reverse-nested-aggregation.asciidoc (#28348)
  [Docs] Fixed Indices information breaking changes (#27914)
  Reindex: Shore up rethrottle test
  isHeldByCurrentThread should return primitive bool
  [Docs] Clarify `html` encoder in highlighting.asciidoc (#27766)
  Only assert single commit iff index created on 6.2
  Deprecate the `update_all_types` option. (#28284)
  Fix GeoDistance query example
  Settings: Introduce settings updater for a list of settings (#28338)
  [Docs] Fix asciidoc style in composite agg docs
  Adapt bwc version after backport #28310
  Adds the ability to specify a format on composite date_histogram source (#28310)
jasontedor added a commit to matarrese/elasticsearch that referenced this pull request Jan 25, 2018
* master: (23 commits)
  Update Netty to 4.1.16.Final (elastic#28345)
  Fix peer recovery flushing loop (elastic#28350)
  REST high-level client: add support for exists alias (elastic#28332)
  REST high-level client: move to POST when calling API to retrieve which support request body (elastic#28342)
  Add Indices Aliases API to the high level REST client (elastic#27876)
  Java Api clean up: remove deprecated `isShardsAcked` (elastic#28311)
  [Docs] Fix explanation for `from` and `size` example (elastic#28320)
  Adapt bwc version after backport elastic#28358
  Always return the after_key in composite aggregation response (elastic#28358)
  Adds test name to MockPageCacheRecycler exception (elastic#28359)
  Adds a note in the `terms` aggregation docs regarding pagination (elastic#28360)
  [Test] Fix DiscoveryNodesTests.testDeltas() (elastic#28361)
  Update packaging tests to work with meta plugins (elastic#28336)
  Remove Painless Type from MethodWriter in favor of Java Class. (elastic#28346)
  [Doc] Fixs typo in reverse-nested-aggregation.asciidoc (elastic#28348)
  Reindex: Shore up rethrottle test
  Only assert single commit iff index created on 6.2
  isHeldByCurrentThread should return primitive bool
  [Docs] Clarify `html` encoder in highlighting.asciidoc (elastic#27766)
  Fix GeoDistance query example (elastic#28355)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants