Improve wording per @jsvd

Fixes #8708
This commit is contained in:
Andrew Cholakian 2017-11-22 05:47:04 -06:00
parent c2a3297a79
commit 98cecf1194

View file

@ -68,15 +68,13 @@ If you are installing Logstash with other components in the Elastic Stack, also
==== Logstash 6.0.0 `document_type` Handling Bug
Wed like to alert users to a bug in Logstash 6.0.0 that can cause errors writing to Elasticsearch 6.0+ clusters. When the `type` field has different values for different events per Elasticsearch index Logstash will encounter errors while indexing documents. These errols look something like the example below, which has been shortened from the full message.
Wed like to alert users to behavior in Logstash 6.0.0 that can cause errors writing to Elasticsearch 6.0+ clusters. When the `type` field has different values for different events per Elasticsearch index Logstash will encounter errors while indexing documents. These errors look something like the example below, which has been shortened from the full message.
`[2017-11-21T14:26:01,991][WARN ][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :response=>{"error"=>{"reason"=>"Rejecting mapping update to [myindex] as the final mapping would have more than 1 type: [type1, type2]"}}}}`
The workaround for Logstash 6.0.0 is to add the setting `document_type => doc` to the Elasticsearch output configuration. Logstash 6.0.1+ will not require this workaround as that will become the new default behavior for Logstash when communicating with Elasticsearch 6.0+.
Logstash 6.0 uses the value of the `type` field to set the Elasticsearch `type` by default. Elasticsearch 6 [no longer supports more than one type]((https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html) per index. In Logstash 6.0.1 we will fix this bug by changing the behavior so that when communicating with an Elasticsearch 6.0+ cluster Logstash will not set the document type by default, but rather, will set it to the value `doc`, regardless of whether an events `[type]` field has been set. The type information of a document will still be available under the field `type`.
The workaround for Logstash 6.0.0 is to add the setting `document_type => doc` to the Elasticsearch output configuration.
Logstash has historically used the value of the `type` field to set the Elasticsearch `type` by default. Elasticsearch 6 [no longer supports more than one type]((https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html) per index. This is why the new behavior will only be applied to Elasticsearch 6.0 + clusters with our upcoming fixes.
Please read on for more information about document types with Logstash and Elasticsearch 6.0