Skip to content


Browse files Browse the repository at this point in the history
out_es: change the default _type to be _doc (#1750)
In order to be compatible with the new versions of ElasticSearch which effectively are getting rid of
_type, we should change the default type to be "_doc"

As per the ElasticSearch forum discussion at:

this seems to be due to not specifying a _type when creating the mapping, at which point it defaults
to "_doc".

Later when performing a bulk operation (indexing) we specifying that _type is "flb_type" which then
causes the error to be thrown about multiple types not being allowed:

"Rejecting mapping update to [logs-2019.11.16] as the final mapping would have more than 1 type: [_doc, flb_type]"

Another possible solution to this issue might be to use the "flb_type" when creating the index (and mappings)
initially, however I'm not sure whether this type is being used for anything (we are not filtering or querying
based on it).

Issue(s): #1359

Signed-off-by: Srdan Dukic <>

Co-authored-by: Serge Dukic <>
  • Loading branch information
srkiNZ84 and Serge Dukic committed May 5, 2020
1 parent 89eea34 commit 04ed3d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/out_es/es.h
Expand Up @@ -24,7 +24,7 @@
#define FLB_ES_DEFAULT_PORT 92000
#define FLB_ES_DEFAULT_INDEX "fluent-bit"
#define FLB_ES_DEFAULT_TYPE "flb_type"
#define FLB_ES_DEFAULT_TYPE "_doc"
#define FLB_ES_DEFAULT_PREFIX "logstash"
#define FLB_ES_DEFAULT_TIME_FMT "%Y.%m.%d"
#define FLB_ES_DEFAULT_TIME_KEY "@timestamp"
Expand Down

0 comments on commit 04ed3d8

Please sign in to comment.