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

Search: Search template not replacing parameter after initial failure in parameter substitution #6318

Closed
bly2k opened this issue May 27, 2014 · 2 comments · Fixed by #6326
Closed

Comments

@bly2k
Copy link
Contributor

bly2k commented May 27, 2014

Steps to reproduce:

  1. Restart ES

  2. Run this (which returns an error as expected):

GET _search/template
{
  "template": {
    "query": { "match_all": {}},
    "size": "{{my_size}}"
  }
}
  1. Then run this (which still returns an error - not expected):
GET _search/template
{
  "template": {
    "query": { "match_all": {}},
    "size": "{{my_size}}"
  },
  "params": {
    "my_size": 1
  }
}
@bly2k bly2k added bug labels May 27, 2014
@s1monw
Copy link
Contributor

s1monw commented May 27, 2014

I can reproduce this... I will look

@s1monw s1monw self-assigned this May 27, 2014
@s1monw s1monw added v1.3.0 and removed v1.2.0 labels May 27, 2014
@GaelTadh
Copy link
Contributor

If you disable the cache this behavior doesn't occur.
Brian

On Tue, May 27, 2014 at 5:02 PM, Simon Willnauer
notifications@github.comwrote:

I can reproduce this... I will look


Reply to this email directly or view it on GitHubhttps://github.com//issues/6318#issuecomment-44296417
.

s1monw added a commit to s1monw/elasticsearch that referenced this issue May 28, 2014
Mustache extracts the key/value pairs for parameter substitution from
objects and maps but it's decided on the first execution. We need to
make sure if the params are null we pass an empty map to ensure we
bind the map based extractor

Closes elastic#6318
s1monw added a commit that referenced this issue May 28, 2014
Mustache extracts the key/value pairs for parameter substitution from
objects and maps but it's decided on the first execution. We need to
make sure if the params are null we pass an empty map to ensure we
bind the map based extractor

Closes #6318
s1monw added a commit that referenced this issue May 28, 2014
Mustache extracts the key/value pairs for parameter substitution from
objects and maps but it's decided on the first execution. We need to
make sure if the params are null we pass an empty map to ensure we
bind the map based extractor

Closes #6318
s1monw added a commit that referenced this issue May 28, 2014
Mustache extracts the key/value pairs for parameter substitution from
objects and maps but it's decided on the first execution. We need to
make sure if the params are null we pass an empty map to ensure we
bind the map based extractor

Closes #6318
@clintongormley clintongormley changed the title Search template not replacing parameter after initial failure in parameter substitution Search: Search template not replacing parameter after initial failure in parameter substitution Jul 16, 2014
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
Mustache extracts the key/value pairs for parameter substitution from
objects and maps but it's decided on the first execution. We need to
make sure if the params are null we pass an empty map to ensure we
bind the map based extractor

Closes elastic#6318
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants