Skip to content

Commit e04f08e

Browse files
committed
Fix doctests
1 parent a9dd961 commit e04f08e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

elasticsearch/src/root/bulk.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ impl Serialize for BulkHeader {
123123
/// .pipeline("process_tweet")
124124
/// .into()
125125
/// );
126-
/// ops.push(BulkOperation::create("2", json!({
126+
/// ops.push(BulkOperation::create(json!({
127127
/// "user": "forloop",
128128
/// "post_date": "2020-01-08T00:00:00Z",
129129
/// "message": "Indexing with the rust client, yeah!"
130-
/// }))
130+
/// })).id("2")
131131
/// .pipeline("process_tweet")
132132
/// .into()
133133
/// );
@@ -605,7 +605,7 @@ impl<B> From<BulkUpdateOperation<B>> for BulkOperation<B> {
605605
/// .index("index_doc")
606606
/// .routing("routing")
607607
/// )?;
608-
/// ops.push(BulkOperation::create("2", CreateDoc { bar: "create" }))?;
608+
/// ops.push(BulkOperation::create(CreateDoc { bar: "create" }).id("2"))?;
609609
/// ops.push(BulkOperation::update("3", UpdateDoc { baz: "update" }))?;
610610
/// ops.push(BulkOperation::<()>::delete("4"))?;
611611
///

0 commit comments

Comments
 (0)