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

Add endpoint to test/debug/view a rendered template query #6821

Closed
mattweber opened this issue Jul 10, 2014 · 1 comment
Closed

Add endpoint to test/debug/view a rendered template query #6821

mattweber opened this issue Jul 10, 2014 · 1 comment
Assignees
Labels
:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >enhancement v2.0.0-beta1

Comments

@mattweber
Copy link
Contributor

It would be nice to be able view what the rendered mustache template query looks like after passing in various params.

An endpoint where you could send a template along with the parameters and it returned the resulting query without actually executing the query would be extremely useful.

@clintongormley
Copy link

++

GaelTadh added a commit to GaelTadh/elasticsearch that referenced this issue Sep 25, 2014
This commit adds a render endpoint to allow rendering of templates.
````
POST /_render/template
'{
  "template":
  {
    "query":
      {
        "{{foo}}": {}
      },
    "size": "{{my_{{}}size}}"
   },
   "params": { "foo": "match_all", "my_size": 10}
}'
````
Will render
````
{
  "template" :
  {
    "query" : {
      "match_all" : {}
    },
    "size" : 10
  }
}
````

Closes elastic#6821
@s1monw s1monw added v1.6.0 and removed v1.5.0 labels Mar 17, 2015
@clintongormley clintongormley assigned colings86 and unassigned GaelTadh Jun 4, 2015
szroland pushed a commit to szroland/elasticsearch that referenced this issue Jun 30, 2015
@clintongormley clintongormley added :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache and removed :Indexed Scripts/Templates labels Feb 13, 2018
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 >enhancement v2.0.0-beta1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants