EricWS
(Eric)
December 3, 2017, 11:11pm
1
Hi all,
We are in the process of upgrading to ElasticSearch 6.0 and Kibana 6.0, however the removal of the use of string as a field type has create issues with being able to display URL's as images using the below settings:
I now can't work out how to do this. We just tried making the field type 'text' but it had no effect.
The current mapping we are using is:
},
"imageUrl": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"imageUrls": {
"type": "text"
},
Any help greatly appreciated.
warkolm
(Mark Walkom)
December 3, 2017, 11:58pm
2
You need to change the imageURL.keyword
field, that is the 6.0 verison of not_analyzed
.
EricWS
(Eric)
December 4, 2017, 12:00am
3
Hi Mark,
Thank you very much. Do I then leave the ImageUrl field set as normal and not to a URL?
EricWS
(Eric)
December 4, 2017, 12:07am
5
Hi Mark,
I have set it as follows and left ImageURL field to default setting.
It still seems to be doing the same thing, see image below.
The mapping is:
},
"imageUrl": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"imageUrls": {
"type": "text"
},
"keyword": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
EricWS
(Eric)
December 4, 2017, 12:27am
6
This is the entire mapping index:
{
"providence_doc-2017-12": {
"mappings": {
"post": {
"properties": {
"entity": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"group": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"imageUrl": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"imageUrls": {
"type": "text"
},
"keyword": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"link": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"location": {
"type": "geo_point",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"postdate": {
"type": "date"
},
"postidentifier": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"sourceid": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"sourcename": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"srid": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"text": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"title": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"username": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
}
EricWS
(Eric)
December 4, 2017, 12:54am
7
Sorry Mark, did you mean change the "keyword" type to "text" rather than "keyword"?
},
"imageUrl": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
EricWS
(Eric)
December 4, 2017, 4:35am
8
Got it all sorted. Thanks Mark the guidance you provided helped greatly.
Cheers!
warkolm
(Mark Walkom)
December 4, 2017, 7:17am
9
Great to hear, can you share the solution? It may help others
EricWS
(Eric)
December 4, 2017, 10:34pm
10
No problem.
We added added 'imageUrl' in the template:
"imageUrl" : {
"type" : "text"
},
"imageUrls" : {
"type" : "text"
},
system
(system)
Closed
January 1, 2018, 10:34pm
11
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.