moshe / elasticsearch_loader

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

Add a --no-type option? #77

Closed packetwatch closed 4 years ago

packetwatch commented 4 years ago

As expected, the TYPE field is no longer necessary in ES 7.X. When importing to an ES7.X cluster I'm getting the error:

'reason': 'The [default] mapping cannot be updated on index [blah]: defaults mappings are not useful anymore now that indices can have at most one type.', 'type': 'illegal_argument_exception'

When I try to designate the index as "", it throws the error:

type is missing

Can we add a '--no-type' flag to allow for ES7.X until 6.X is EOL?

Thanks for this tool!

packetwatch commented 4 years ago

Never mind... Not necessary after all.

My issue was the Template for the index existed and had been created in 6.X already. I deleted the template with the following command and when ES-Loader ran the index was created successfully.

curl -XDELETE http://localhost:9200/_template/logstash

In case anyone else has that issue....

Thanks again!