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: Improve Documentation #23777

Closed
10 of 22 tasks
jdconrad opened this issue Mar 28, 2017 · 20 comments
Closed
10 of 22 tasks

Painless: Improve Documentation #23777

jdconrad opened this issue Mar 28, 2017 · 20 comments
Assignees
Labels
:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >docs General docs changes Meta

Comments

@jdconrad
Copy link
Contributor

jdconrad commented Mar 28, 2017

Painless documentation plan --

Quick Start - Use existing documentation to create quick start guide
Lang Spec - General lang spec for Painless
Examples - Show code for Painless
Bindings - Explain each available variable for the binding (context)

@jdconrad
Copy link
Contributor Author

jdconrad commented May 2, 2017

Wanted to give an update on this: @debadair has done some significant editing on the intro and constants, variables, and types sections. And she's come up with this as a possible model for the re-vamped documentation moving forward:

    Painless Scripting

    <introduction>

        Getting Started with Painless

            Accessing Doc Values 

            Updating Fields

            Working with Dates

            Using Regular Expressions

            Debugging Painless Scripts

    Example Scripts

        Using Painless in Script Fields

        Using Painless in Watches

        Using Painless in Function Score Queries

        Using Painless in Script Queries

        Using Painless When Updating Docs

        Using Painless When Reindexing

    How Painless Works

        Painless Architecture

        Dispatching Functions

    Painless Language Specification

    Painless API Reference

I am about 3/4 of the way through the operators section and plan to be done this week after which I'll hand it off for editing and move onto Control Flow.

I'm thinking that we an edit what already exists into the quick start guide and possibly post the lang spec with the initial 5 sections -- intro, constants variables and types, operators, control flow, and structure. This will help get some better docs out sooner, and then move forward from there.

@jdconrad
Copy link
Contributor Author

jdconrad commented May 2, 2017

Added the working progress to a branch here: https://github.com/jdconrad/elasticsearch/blob/painless-docs/docs/reference/modules/scripting/painless-lang-spec.asciidoc\

Important: This does not contain the editing that Deb has done yet! It's very raw still.

@clintongormley
Copy link
Contributor

@jdconrad
Copy link
Contributor Author

Update: No real progress as script contexts have taken priority. @talevy has kindly volunteered to help with some of the script context example documentation when he has a bit of time.

@jdconrad
Copy link
Contributor Author

Update: Currently working on re-structuring and cleaning up some of the existing documentation. Control flow documentation soon to follow.

@jdconrad
Copy link
Contributor Author

jdconrad commented Apr 10, 2018

PR to rework the structure and clean up comments, keywords, and literals. (#29441)

@jdconrad
Copy link
Contributor Author

jdconrad commented Apr 18, 2018

PR to add identifiers and improve existing docs for variables. (#29592)

@jdconrad
Copy link
Contributor Author

jdconrad commented May 1, 2018

PR for types clean up in the spec. (#30283)

@jdconrad
Copy link
Contributor Author

jdconrad commented May 15, 2018

PR for casting clean up in the spec. (#30283)

@jdconrad jdconrad changed the title Improve Painless Documentation Painless: Improve Documentation May 31, 2018
@jdconrad jdconrad mentioned this issue May 31, 2018
23 tasks
@jdconrad
Copy link
Contributor Author

PR for operator restructure plus some clean up (#31013).

@jdconrad
Copy link
Contributor Author

jdconrad commented Jun 2, 2018

Notes following clean up:

  1. Add documentation for how byte, short, and char literals are implicitly cast the appropriate type if within a valid range.
  2. Should all examples include promotion?
  3. Should all examples use promotion only for run-time? This is kind of already the case.
  4. Consider 'use' instead of 'uses' in example descriptions.
  5. Should integral' be used instead of 'integer?'
  6. Should reference definitions be added for list/map since they are used heavily in examples?
  7. Do errors sections need more consistency?
  8. Consider simplifying syntax for implicit cast in examples.
  9. Consider use of 'expression' versus 'value'; 'value' is likely the best description given the current definitions.
  10. Operators sections probably could use more links to types and casting.
  11. Ensure consistency of semicolons in callouts.
  12. Ensure consistency of 'evaluted value' versus just 'value.'

@jdconrad
Copy link
Contributor Author

jdconrad commented Jun 2, 2018

@jdconrad
Copy link
Contributor Author

jdconrad commented Jun 5, 2018

Note - is type value too verbose? Consider changing X type value to X type, X value, X variable, and X field where X is the specific type such as reference, numeric, int, String, etc.

@jdconrad
Copy link
Contributor Author

jdconrad commented Jun 8, 2018

PR for operator restructure/clean up is committed (#31013) to both 7 and 6.4.

@jdconrad
Copy link
Contributor Author

jdconrad commented Jun 8, 2018

PR for context information (#31190).

@jdconrad
Copy link
Contributor Author

jdconrad commented Jul 2, 2018

Context information has been committed.

@jdconrad
Copy link
Contributor Author

Begun to add context examples (#32302).

@jrodewig
Copy link
Contributor

jrodewig commented Nov 1, 2019

[docs issue triage]

@stu-elastic
Copy link
Contributor

Context documentation migrated to #49865

@jdconrad
Copy link
Contributor Author

jdconrad commented Dec 5, 2019

Closing in favor of newer issues.

@jdconrad jdconrad closed this as completed Dec 5, 2019
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

9 participants