removed useless comment and make sure all public constructors delegate to the package protected constructor.

This commit is contained in:
Martijn van Groningen 2016-07-27 10:01:36 +02:00
parent 2fdf79d8d4
commit d1b7a335cb
1 changed files with 2 additions and 3 deletions

View File

@ -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) {