removed useless comment and make sure all public constructors delegate to the package protected constructor.
This commit is contained in:
parent
2fdf79d8d4
commit
d1b7a335cb
|
@ -60,14 +60,13 @@ public class TemplateQueryBuilder extends AbstractQueryBuilder<TemplateQueryBuil
|
||||||
private final Script template;
|
private final Script template;
|
||||||
|
|
||||||
public TemplateQueryBuilder(String template, ScriptService.ScriptType scriptType, Map<String, Object> params) {
|
public TemplateQueryBuilder(String template, ScriptService.ScriptType scriptType, Map<String, Object> params) {
|
||||||
this.template = new Script(template, scriptType, "mustache", params);
|
this(new Script(template, scriptType, "mustache", params));
|
||||||
}
|
}
|
||||||
|
|
||||||
public TemplateQueryBuilder(String template, ScriptService.ScriptType scriptType, Map<String, Object> params, XContentType ct) {
|
public TemplateQueryBuilder(String template, ScriptService.ScriptType scriptType, Map<String, Object> params, XContentType ct) {
|
||||||
this.template = new Script(template, scriptType, "mustache", params, ct);
|
this(new Script(template, scriptType, "mustache", params, ct));
|
||||||
}
|
}
|
||||||
|
|
||||||
// for tests, so that mock script can be used:
|
|
||||||
TemplateQueryBuilder(Script template) {
|
TemplateQueryBuilder(Script template) {
|
||||||
DEPRECATION_LOGGER.deprecated("[{}] query is deprecated, use search template api instead", NAME);
|
DEPRECATION_LOGGER.deprecated("[{}] query is deprecated, use search template api instead", NAME);
|
||||||
if (template == null) {
|
if (template == null) {
|
||||||
|
|
Loading…
Reference in New Issue