Starting from version 6.0, Elasticsearch no longer accepts documents with more than one type.
Beats+Logstash 5.x create documents with different types than Beats+Logstash 6.x, making it impossible to upgrade these pieces of software with Elasticsearch indices containing data from previous versions.
It is thus necessary to upgrade Logstash first before attempting an upgrade of Elasticsearch itself or adding cluster nodes running Elasticsearch >= 6.x.