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

[Painless] Context Doc Examples #34829

Closed
12 of 17 tasks
jdconrad opened this issue Oct 24, 2018 · 5 comments
Closed
12 of 17 tasks

[Painless] Context Doc Examples #34829

jdconrad opened this issue Oct 24, 2018 · 5 comments
Labels
:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >docs General docs changes Meta

Comments

@jdconrad
Copy link
Contributor

jdconrad commented Oct 24, 2018

Painless has some basic documentation for contexts at https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html . Each context has a separate page that describes the what variables are available to a Painless script such as doc and params. These contexts each need to be reviewed by someone familiar with the related code and have one or more examples added.

There is a data set for examples already available for download and steps to setup the an ES cluster with that data set at https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-context-examples.html . For consistency it would be ideal if any examples generated were based on this data set and the contexts put in order of dependency within the index contexts page. (Ingest needs to go first.) Each example also has a test along with the curl commands as comments in the ContextExampleTests under Painless.

Several contexts have changed recently and will need to updated to reflect those changes such as search -> score.

The following contexts need review and/or examples:

@jdconrad jdconrad added >docs General docs changes :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache Meta v7.0.0 v6.6.0 labels Oct 24, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@nik9000
Copy link
Member

nik9000 commented Oct 25, 2018

Do you think we should document these contexts along side the documentation for the API that they are used in?

@rjernst
Copy link
Member

rjernst commented Oct 25, 2018

We should probably at least cross link.

@jdconrad
Copy link
Contributor Author

jdconrad commented Oct 26, 2018

I would strongly prefer cross-links here as the examples will possibly depend on each other so that users can fire up a cluster and run through them like a tutorial. This way each page can come in order. And while Painless is the primary language now for most of these, there are other languages too, so I would like to keep this as part of the Painless docs.

mayya-sharipova added a commit to mayya-sharipova/elasticsearch that referenced this issue Oct 31, 2018
mayya-sharipova added a commit to mayya-sharipova/elasticsearch that referenced this issue Nov 6, 2018
mayya-sharipova added a commit that referenced this issue Nov 8, 2018
* Painless Context Doc: Add field context example

relates to #34829
mayya-sharipova added a commit that referenced this issue Nov 8, 2018
mayya-sharipova added a commit to mayya-sharipova/elasticsearch that referenced this issue Nov 9, 2018
@jasontedor jasontedor added v6.7.0 and removed v6.6.0 labels Dec 19, 2018
rjernst added a commit to rjernst/elasticsearch that referenced this issue Jan 28, 2019
This commit improves the example docs for contexts in painless.

relates elastic#34829
rjernst added a commit that referenced this issue Jan 28, 2019
This commit improves the example docs for contexts in painless.

relates #34829
@jasontedor jasontedor added v8.0.0 and removed v7.0.0 labels Feb 6, 2019
@jdconrad
Copy link
Contributor Author

Closing this as there are examples for the majority of contexts as this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >docs General docs changes Meta
Projects
None yet
Development

No branches or pull requests

8 participants