Fix ES 5 support

This commit is contained in:
Jean Flach 2018-04-11 14:04:39 +02:00 committed by Michael Friedrich
parent fd5d4c5974
commit 1e0f67d778
1 changed files with 2 additions and 2 deletions

View File

@ -419,9 +419,9 @@ void ElasticsearchWriter::SendRequest(const String& body)
path.emplace_back(GetIndex() + "-" + Utility::FormatDateTime("%Y.%m.%d", Utility::GetTime()));
/* ES 6 removes multiple _type mappings: https://www.elastic.co/guide/en/elasticsearch/reference/6.x/removal-of-types.html
* Best practice is to statically define 'doc'.
* Best practice is to statically define 'doc', as ES 5.X does not allow types starting with '_'.
*/
path.emplace_back("_doc");
path.emplace_back("doc");
/* Use the bulk message format. */
path.emplace_back("_bulk");