Id could be title and/or id

This commit is contained in:
Jesús Ángel González 2018-04-11 12:45:40 +02:00
parent a06e8e9e78
commit 931348f1f7

View File

@ -206,7 +206,7 @@ class ElasticWrapper{
const data = await this.elasticRequest.callWithInternalUser('update', { const data = await this.elasticRequest.callWithInternalUser('update', {
index: '.kibana', index: '.kibana',
type: 'doc', type: 'doc',
id: id, id: id.includes('index-pattern:') ? id : 'index-pattern:' + id,
body: { body: {
doc: { doc: {
"type": 'index-pattern', "type": 'index-pattern',