Skip to content
Permalink
Browse files

Search template: Fix support for source parameter

If a search template was created using the source parameter, the
content of the parameter was put as source instead of sourceTemplate

Fixes #5556
  • Loading branch information...
spinscale committed Mar 31, 2014
1 parent 880392f commit f950ddccc224072018f316814ab7ad8be34c0a20
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/java/org/elasticsearch/action/search/SearchRequest.java
@@ -422,9 +422,9 @@ public SearchRequest templateSource(BytesReference template, boolean unsafe) {
/**
* The template of the search request.
*/
public SearchRequest templateSource(String source) {
this.source = new BytesArray(source);
this.sourceUnsafe = false;
public SearchRequest templateSource(String template) {
this.templateSource = new BytesArray(template);
this.templateSourceUnsafe = false;
return this;
}

0 comments on commit f950ddc

Please sign in to comment.
You can’t perform that action at this time.