Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/Nest/Document/Single/Delete/DeleteResponse.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
using System;
using Newtonsoft.Json;

namespace Nest
{
Expand Down Expand Up @@ -40,14 +41,19 @@ public class DeleteResponse : ResponseBase, IDeleteResponse

[JsonProperty("_type")]
public string Type { get; internal set; }

[JsonProperty("_id")]
public string Id { get; internal set; }

[JsonProperty("_version")]
public string Version { get; internal set; }

[JsonProperty("found")]
public bool Found { get; internal set; }

[Obsolete(@"WARNING: IsValid behavior has changed to align with 1.x and 5.x onwards.
It now returns true for 404 responses (document not found), where previously it returned
false. Please use .Found to check whether the document was actually found.")]
public override bool IsValid => base.IsValid;
}
}
8 changes: 5 additions & 3 deletions src/Nest/Document/Single/Get/GetResponse.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Newtonsoft.Json;
using System.Linq;

namespace Nest
{
Expand Down Expand Up @@ -56,5 +53,10 @@ public class GetResponse<T> : ResponseBase, IGetResponse<T> where T : class
public string Routing { get; private set; }
public long? Timestamp { get; private set; }
public long? Ttl { get; private set; }

[Obsolete(@"WARNING: IsValid behavior has changed to align with 1.x and 5.x onwards.
It now returns true for 404 responses (document not found), where previously it returned
false. Please use .Found to check whether the document was actually found.")]
public override bool IsValid => base.IsValid;
}
}