Skip to content

Commit dc2ad2d

Browse files
committed
Remove default type as Elastic 7 deprecates document types
See: https://www.elastic.co/guide/en/elasticsearch/reference/7.x/removal-of-types.html `_doc` is a dummy document type that will work as well with older Elastic versions
1 parent 23fd223 commit dc2ad2d

File tree

1 file changed

+2
-2
lines changed
  • elasticsearch/io_modules/encoders/elasticsearch

1 file changed

+2
-2
lines changed

elasticsearch/io_modules/encoders/elasticsearch/common.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ encoders_elasticsearch_common = {
1919
2020
-- String to use as the `_type` key's value in the generated JSON.
2121
-- Supports field interpolation as described below.
22-
type_name = "message" -- optional, default shown
22+
type_name = "_doc" -- optional, default shown
2323
2424
-- String to use as the `_id` key's value in the generated JSON.
2525
-- Supports field interpolation as described below.
@@ -126,7 +126,7 @@ function load_encoder_cfg()
126126
end
127127

128128
if cfg.type_name == nil then
129-
cfg.type_name = "message"
129+
cfg.type_name = "_doc"
130130
else
131131
assert(type(cfg.type_name) == "string", "type_name must be nil or a string")
132132
end

0 commit comments

Comments
 (0)