moshe / elasticsearch_loader

A tool for batch loading data files (json, parquet, csv, tsv) into ElasticSearch
MIT License
399 stars 83 forks source link

Resolve [_type] illegal argument exception #104

Open lucafrost opened 2 years ago

lucafrost commented 2 years ago

Current version of elasticsearch_loader passes _type iteratively during data indexing. As per Elastic's announcement & overview on types, typeless APIs have been best practice since ES 6.0, and users who have upgraded to ES 8.0 will no longer be able to use _type.

Elastic 8.0 users attempting to use elasticsearch_loader will be met with the error RequestError(400, 'illegal_argument_exception', 'Action/metadata line [1] contains an unknown parameter [_type]') despite not passing --type as a CLI arg.

This edit resolves the issue painlessly