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

Partials not working in Mustache template #10256

Closed
zdeseb opened this issue Mar 25, 2015 · 2 comments
Closed

Partials not working in Mustache template #10256

zdeseb opened this issue Mar 25, 2015 · 2 comments
Labels
discuss >enhancement :Search/Search Search-related issues that do not fall into other categories

Comments

@zdeseb
Copy link

zdeseb commented Mar 25, 2015

There is feature in Mustache templates called Partials which allows to include one template into another.

This could be very useful feature (especially while constructing more complex queries) but it doesn't work correctly in ES pre-registered templates

Steps to reproduce:

  1. create file child.mustache file in config/scripts folder with content
    "match_all": {}
  2. wait until ES compiles this file what is indicated by following text in log
    compiling script file [...\config\scripts\child.mustache]
  3. create file parent.mustache file in config/scripts folder with content
{
  "query": {
    {{>child}}
  }
}
  1. When ES tries to compile parent template, following error occurs
failed to load/compile script [parent]
org.elasticsearch.common.mustache.MustacheException: Template 'child' not found

It looks like ES understands partial syntax but is unable to find existing template.

I'm facing this problem in ES 1.4.4 but the same problem was in 1.2.2 too

@clintongormley
Copy link

Related to #10047

@clintongormley
Copy link

No plans to implement partials, given then outcome of #10047

@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Search Templates labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss >enhancement :Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

No branches or pull requests

3 participants