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

Make helpers examples runnable #2483

Merged
merged 10 commits into from
Mar 26, 2024

Conversation

iuliaferoli
Copy link
Contributor

adding examples of how to import the helpers;
adding the client definition since bulk and es were used
without context / definition
changed from es to client to stay consistent with the quickstart naming convention

 removing the double index instructoins
adding the client definition since ```bulk``` and ```es``` were used
without context / definition
changed from es to client to stay consistent with the quickstart naming convention
Copy link

A documentation preview will be available soon.

Request a new doc build by commenting
  • Rebuild this PR: run docs-build
  • Rebuild this PR and all Elastic docs: run docs-build rebuild

run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.

If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here.

@iuliaferoli iuliaferoli requested a review from pquentin March 22, 2024 14:07
Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

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

Great idea, thanks!


.. code-block:: python

from elasticsearch import Elasticsearch, helpers
Copy link
Member

Choose a reason for hiding this comment

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

Any reason to import helpers here? Do we use it anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't; I just wanted to have at least one example of importing the rest of them, other than bulk?
But we can also skip this one

Copy link
Member

@pquentin pquentin Mar 26, 2024

Choose a reason for hiding this comment

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

Yes it seems weird if we don't use it. Either we call helpers.bulk or we drop this IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

docs/sphinx/helpers.rst Outdated Show resolved Hide resolved
Co-authored-by: Quentin Pradet <[email protected]>
@pquentin pquentin changed the title added import example and client definition to the helpers page Make helpers examples runnable Mar 26, 2024
@pquentin pquentin merged commit 8a97cc1 into elastic:main Mar 26, 2024
11 checks passed
github-actions bot pushed a commit that referenced this pull request Mar 26, 2024
Co-authored-by: Quentin Pradet <[email protected]>
(cherry picked from commit 8a97cc1)
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.

2 participants