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: Add min should match example #35423

Conversation

mayya-sharipova
Copy link
Contributor

relates to #34829

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

Pinging @elastic/es-core-infra

@jdconrad jdconrad mentioned this pull request Nov 9, 2018
17 tasks
actors play. You have a list of favorite actors in mind, and you want
to find performances that have at least certain minimum number of actors
from your favorite list. `terms_set` query with
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 "where your favorite actors play", maybe "by your favorite actors."?

The second sentence could be pared down to: "You have a list of favorite actors in mind, and you want to find performances where the cast includes at least a certain number of them."

the parameter `num_terms`, which represents the length of the list of
your favorite actors.

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 pare this down to: "To ensure that the minimum number of actors doesn't exceed the number of favorite actors, you can use num_terms to get the number of actors in the list and Math.min to get the lesser of the two."


Submit the following request to find seats to performances with your favorite actors:

Copy link
Contributor

Choose a reason for hiding this comment

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

"The following request finds seats to performances with at least two of the three specified actors."

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 looks good to me. Really good example - thank you!

@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 a8833b0 into elastic:master Nov 15, 2018
@mayya-sharipova mayya-sharipova deleted the painless-context-min-should-match-example branch November 15, 2018 20:10
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