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

Document the option to use painless as script language in search templates #50923

Closed
laraMorenoIgle opened this issue Jan 13, 2020 · 6 comments
Closed
Assignees
Labels
:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >docs General docs changes Team:Core/Infra Meta label for core/infra team Team:Docs Meta label for docs team

Comments

@laraMorenoIgle
Copy link

Painless can be used as script language for search templates as done in this github #24529.
However as per our documentation mustache is the only allowed language for creating search templates.
If painless is fully supported as script language in search templates, then we should state it in the documenation and provide at least one example.

@laraMorenoIgle laraMorenoIgle added >docs General docs changes :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache labels Jan 13, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Scripting)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (>docs)

@jdconrad
Copy link
Contributor

If we do want to officially support this, we need to add some test coverage to ensure changes to Painless don't break templates unknowingly. We may also want to consider the places that watcher hard codes mustache for template support.

@jdconrad
Copy link
Contributor

Spoke with @stu-elastic and @rjernst - we've agreed this should be supported, so it's a matter of tests and docs now.

@jdconrad jdconrad self-assigned this Jan 14, 2020
@rjernst rjernst added Team:Core/Infra Meta label for core/infra team Team:Docs Meta label for docs team labels May 4, 2020
@rjernst rjernst added the needs:triage Requires assignment of a team area label label Dec 3, 2020
@stu-elastic stu-elastic removed the needs:triage Requires assignment of a team area label label Dec 9, 2020
@sauln
Copy link

sauln commented Mar 6, 2021

Hey, I'm stoked to get to use Painless in my search templates. Is there any draft documentation on how this works? I'm not sure if the syntax described in #24529 is relevant at all.

Thank you,

@stu-elastic
Copy link
Contributor

stu-elastic commented Mar 18, 2021

Painless cannot be used in search templates and we do not currently have plans to add the functionality necessary to make it useful in that context.

If there are shortcomings in mustache that need to be addressed, we'd love to see them, with use cases, in separate issues.

Since the documentation on the search template API is correct,

Allows you to use the mustache language to pre render search requests.

I'm going to close this issue.

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 Team:Core/Infra Meta label for core/infra team Team:Docs Meta label for docs team
Projects
None yet
Development

No branches or pull requests

6 participants