Skip to content

Include Result property on IBulkResponseItem #3376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2018
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ public class BulkIndexResponseItem : BulkResponseItemBase
public override string Operation { get; internal set; }

/// <summary>
/// Null if Percolation was not requested while indexing this doc, otherwise returns the percolator _ids that matched (if any)
/// The _ids that matched (if any) for the Percolate API.
/// Will be null if the operation is not in response to Percolate API.
/// </summary>
[JsonProperty("matches")]
public IEnumerable<string> Matches { get; internal set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ public interface IBulkResponseItem
[JsonProperty("_version")]
long Version { get; }

/// <summary>
/// The result of the bulk operation
/// </summary>
[JsonProperty("result")]
string Result { get; }

/// <summary>
/// The status of the bulk operation
/// </summary>
Expand Down Expand Up @@ -86,6 +92,9 @@ public abstract class BulkResponseItemBase : IBulkResponseItem
/// <inheritdoc />
public long Version { get; internal set; }

/// <inheritdoc />
public string Result { get; internal set; }

/// <inheritdoc />
public int Status { get; internal set; }

Expand Down
1 change: 1 addition & 0 deletions src/Tests/Tests/Document/Multiple/Bulk/BulkApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ protected override void ExpectResponse(IBulkResponse response)
item.Shards.Successful.Should().BeGreaterThan(0);
item.SequenceNumber.Should().BeGreaterOrEqualTo(0);
item.PrimaryTerm.Should().BeGreaterThan(0);
item.Result.Should().NotBeNullOrEmpty();
}

var project1 = this.Client.Source<Project>(Project.Instance.Name, p => p.Index(CallIsolatedValue));
Expand Down