-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Closed
Description
This issue refers to this discussion
Context :
There's no way with the Java client API to create a template and set the source like that :
PutIndexTemplateResponse response = client.admin().indices()
.preparePutTemplate("twitter_template").
.setSource(sourceTemplate)
.execute()
.actionGet();
instead to set settings, mappings ... like that :
PutIndexTemplateResponse response = client.admin().indices()
.preparePutTemplate("twitter_template")
.setTemplate("twitter*")
.addMapping("tweet", sourceMapping)
.setSettings(sourceSettings)
.execute()
.actionGet();
Solution :
We have to move the parsing logic from RestPutIndexTemplateAction.handleRequest()
method to the PutIndexTemplateRequest.setSource()
method
Metadata
Metadata
Assignees
Labels
No labels