jbdemonte / mongoose-elasticsearch-xp

A mongoose plugin that indexes models into Elasticsearch 2 / 5 / 6 and 7
93 stars 34 forks source link

Add support for apiVersion option in elasticsearch client #74

Open pekastel opened 3 years ago

pekastel commented 3 years ago

Hi, @jbdemonte

I'm facing an issue while creating documents on older ElasticSearch Servers (5.6)

Error: [invalid_type_name_exception] Document mapping type name can't start with '_', found: [_doc]

An easy fix for this kind of errors would be to add support for apiVersion option on the ElasticSearch client.

I can prepare a pull request if you want.