Skip to content

Conversation

@mayya-sharipova
Copy link
Contributor

relates to #34829

@mayya-sharipova mayya-sharipova added v7.0.0 v6.6.0 >docs General docs changes :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache labels Nov 6, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@mayya-sharipova
Copy link
Contributor Author

some vagrant tests failed not related to this PR


This script allows to find all documents where the value of `doc['sold']`
is `false`, and where the cost is less than 18.

Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of "allows to find", I'd just say "finds". Given the straightforwardness of the example, I'd just summarize the intent of the script, instead of repeating what the code says:

This script finds all unsold documents that cost less than $18.

a script parameter. Submit the following script query request
to filter all theatre seats for evening performances that are not
sold yet, and where the cost is less than `params.cost`:

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd tweak this slightly to put the emphasis on parameterizing cost:

Defining cost as a script parameter enables the cost to be configured in the script query request. For example,
the following request finds all available theatre seats for evening performances that are under $18.

Copy link
Contributor

@jdconrad jdconrad left a comment

Choose a reason for hiding this comment

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

Tech side of this looks good. Thanks for this example!

@mayya-sharipova
Copy link
Contributor Author

@debadair Thank you for your feedback. I have modified the doc file according to it. Please let me know if this PR is ready for the approval.

Copy link
Contributor

@debadair debadair left a comment

Choose a reason for hiding this comment

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

LGTM

@mayya-sharipova mayya-sharipova merged commit 501c03e into elastic:master Nov 15, 2018
@mayya-sharipova mayya-sharipova deleted the painless-context-filter-example branch November 15, 2018 19:33
@jimczi jimczi added v7.0.0-beta1 and removed v7.0.0 labels Feb 7, 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 v6.6.0 v7.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants