Image Display Issues

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.

You need to change the imageURL.keyword field, that is the 6.0 verison of not_analyzed.

Hi Mark,

Thank you very much. Do I then leave the ImageUrl field set as normal and not to a URL?

Yes.

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
              }
            }

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
              }
            }
          }
        }
      }
    }
  }
}

Sorry Mark, did you mean change the "keyword" type to "text" rather than "keyword"?

},
          "imageUrl": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },

Got it all sorted. Thanks Mark the guidance you provided helped greatly.

Cheers!

Great to hear, can you share the solution? It may help others :slight_smile:

No problem.

We added added 'imageUrl' in the template:

  "imageUrl" : {
    "type" : "text"
  },
  "imageUrls" : {
    "type" : "text"
  },

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.