Skip to content

Commit 4123f41

Browse files
codebrainMpdreamz
authored andcommitted
Add index name to ICreateIndexResponse (#3827)
* Add index name to ICreateIndexResponse Fixes #3823 * Index is returned in Elasticsearch 6.0.0, so condition is not needed
1 parent 3f28f4d commit 4123f41

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/Nest/Indices/IndexManagement/CreateIndex/CreateIndexResponse.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ public interface ICreateIndexResponse : IAcknowledgedResponse
77
{
88
[JsonProperty("shards_acknowledged")]
99
bool ShardsAcknowledged { get; }
10+
11+
[JsonProperty("index")]
12+
string Index { get; }
1013
}
1114

1215
public class CreateIndexResponse : AcknowledgedResponseBase, ICreateIndexResponse
1316
{
1417
public bool ShardsAcknowledged { get; set; }
18+
19+
public string Index { get; set; }
1520
}
1621
}

src/Tests/Tests/Indices/IndexManagement/CreateIndex/CreateIndexApiTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ protected override void ExpectResponse(ICreateIndexResponse response)
205205
response.ShouldBeValid();
206206
response.Acknowledged.Should().BeTrue();
207207
response.ShardsAcknowledged.Should().BeTrue();
208+
response.Index.Should().Be(CallIsolatedValue);
208209

209210
var indexSettings = Client.GetIndexSettings(g => g.Index(CallIsolatedValue));
210211

0 commit comments

Comments
 (0)