elastic / elasticsearch-rs

Official Elasticsearch Rust Client
https://www.elastic.co/guide/en/elasticsearch/client/rust-api/current/index.html
Apache License 2.0
705 stars 72 forks source link

[BUG] BulkCreateOperation requires `_id` field, although it is optional #190

Closed mfelsche closed 2 years ago

mfelsche commented 2 years ago

Describe the bug Both the BulkOperation::create as well as BulkCreateOperation::new require an _id argument, although this is optional according to the docs in https://www.elastic.co/guide/en/elasticsearch/reference/7.14/docs-bulk.html#bulk-api-request-body

Expected behavior

Provide a way to create a BulkCreateOperation without the _id, e.g. make the argument an Option<S>.

Environment (please complete the following information):

russcam commented 2 years ago

Hi @mfelsche, this is the same issue as #174; I'm going to close to consolidate on that issue.

mfelsche commented 2 years ago

Thank you! I honestly didn't find #174 when i filed this one, my bad.