Skip to content

Commit 127e544

Browse files
committed
added support for doc_as_upsert fix #368
1 parent 75f4b26 commit 127e544

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Nest/DSL/UpdateDescriptor.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ public UpdateDescriptor()
2929
[JsonProperty(PropertyName = "upsert")]
3030
internal object _Upsert { get; set; }
3131

32+
[JsonProperty(PropertyName = "doc_as_upsert")]
33+
internal bool? _DocAsUpsert { get; set; }
34+
3235
[JsonProperty(PropertyName = "doc")]
3336
internal K _Document { get; set; }
3437

@@ -82,6 +85,12 @@ public UpdateDescriptor<T, K> Document(K @object)
8285
return this;
8386
}
8487

88+
public UpdateDescriptor<T, K> DocAsUpsert(bool docAsUpsert = true)
89+
{
90+
this._DocAsUpsert = docAsUpsert;
91+
return this;
92+
}
93+
8594

8695
public UpdateDescriptor<T, K> Index(string index)
8796
{

0 commit comments

Comments
 (0)